Paging through a collection

Stefan Arentz sarentz at
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:

MAX_HISTORY_UPLOAD:                    1000,
MAX_HISTORY_DOWNLOAD:                  1000,

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&limit=1000
GET /storage/history?full=1&sort=index&limit=1000
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...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <>

More information about the Sync-dev mailing list