Merge lp:~leonardr/lazr.restful/integrate-optimized-len into lp:lazr.restful
Status: | Merged |
---|---|
Approved by: | Edwin Grubbs |
Approved revision: | 142 |
Merged at revision: | 140 |
Proposed branch: | lp:~leonardr/lazr.restful/integrate-optimized-len |
Merge into: | lp:lazr.restful |
Diff against target: |
283 lines (+90/-20) 9 files modified
src/lazr/restful/NEWS.txt (+7/-0) src/lazr/restful/_resource.py (+13/-4) src/lazr/restful/docs/multiversion.txt (+10/-5) src/lazr/restful/example/base/tests/collection.txt (+28/-3) src/lazr/restful/example/multiversion/root.py (+2/-0) src/lazr/restful/example/multiversion/tests/introduction.txt (+12/-0) src/lazr/restful/example/multiversion/tests/operation.txt (+16/-6) src/lazr/restful/version.txt (+1/-1) versions.cfg (+1/-1) |
To merge this branch: | bzr merge lp:~leonardr/lazr.restful/integrate-optimized-len |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Edwin Grubbs (community) | code | Approve | |
Review via email: mp+33023@code.launchpad.net |
Description of the change
Thanks to an optimization in lazr.batchnavig
This branch backs lazr.restful away a little bit from its absolute insistence on sending 'total_size_link' instead of 'total_size' in responses to named operations. If the total size of the list turns out to be cheap to calculate, lazr.restful calculates it and sends 'total_size' instead of 'total_size_link'.
Most of this branch consists of test changes: creating scenarios in which the optimization doesn't apply, and showing that total_size_link is sent; creating scenarios in which the optimization does apply, and showing that total_size is sent instead. In one case this required creating extra sample data to pad out a collection returned from a named operation.
Hi Leonard,
This looks good.
-Edwin