Paging through a collection
sarentz at mozilla.com
Mon Sep 29 08:12:17 PDT 2014
I’m trying to create a functional test for my sync server that validates that paging works correctly.
I’m trying to mimic what Firefox does, but since the default download batch size is 5000 and I have only ~2500 history items, I would never see paging in action.
So, I modified my Firefox client to use:
Expecting it to download 1000 history records at a time, and using paging to get them all.
But to my surprise the sync client in Firefox now does something completely different than before:
GET /storage/history?full=1&ids=long,list,of,ids (15 times this kind of request)
First it grabs 1000 full records, sorted by last modified.
Then it asks for 1000 object ids of history items with the highest sort index
Then it requests 750 individual records
I don’t understand the logic here. Why doesn’t the client use the limit and offset parameters to grab all history in three requests?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
More information about the Sync-dev