Merge lp:~james-w/lazr.restfulclient/improve-collection-fetch-optimisation into lp:lazr.restfulclient
Proposed by
James Westby
Status: | Work in progress |
---|---|
Proposed branch: | lp:~james-w/lazr.restfulclient/improve-collection-fetch-optimisation |
Merge into: | lp:lazr.restfulclient |
Diff against target: |
39 lines (+12/-10) 1 file modified
src/lazr/restfulclient/resource.py (+12/-10) |
To merge this branch: | bzr merge lp:~james-w/lazr.restfulclient/improve-collection-fetch-optimisation |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | code | Needs Information | |
Review via email: mp+16841@code.launchpad.net |
To post a comment you must log in.
Unmerged revisions
- 87. By James Westby
-
Account for the case where there isn't a first page properly.
- 86. By James Westby
-
Make the optimisation in Collection.
_get_slice apply to more cases. Collection.
_get_slice had an optimisation to fetch smaller pages if it
thought that a full page was unneeded. However, it only applied this on
the second and subsequent fetch. This change makes it apply to the first
fetch as well, as it applies there equally.
Hi,
This change helps with fetching large collections. There is
on optimisation that sets the desired page size if it looks
like a full page will be unneeded, but the way it was coded
meant that the first fetch was always full.
The change here means that the optimisation is more widely applied,
but critically for me you can actually control the size of the fetches
my looping the slices. Some API calls are liable to timeout, so
chunking them smaller allows you to use them, and that's currently
not possible. With this change you can iterate slices to control
the page size.
Thanks,
James