Closed Bug 535326 Opened 15 years ago Closed 15 years ago

Need to rethink tab sync limit of 25

Categories

(Firefox :: Sync, defect)

x86
macOS
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: rags, Assigned: Mardak)

References

Details

Attachments

(1 file)

So, we currently have an arbitrary limit of syncing only 25 of your "recent" tabs. This feels broken. I'm opening this bug so we can track this issue and come up with a better UX.
I came here looking specifically for this issue and was glad to see a bug had been opened. 25 tabs does seem arbitrary and for me at least too low. Couldn't this just be configurable somewhere, or set much higher at the very least? Right now it just looks like the sync failed after 25 tabs.
It's a semi-arbitrary limit, set this low to avoid overloading a) the UI and b) the max record size, which was causing full-out failures. I'd like to implement something better for the UI, and then fix the sync engine to remove the limits on number of tabs synced (or, at least increase this significantly).
(In reply to comment #1) > I came here looking specifically for this issue and was glad to see a bug had > been opened. 25 tabs does seem arbitrary and for me at least too low. Couldn't > this just be configurable somewhere, or set much higher at the very least? > Right now it just looks like the sync failed after 25 tabs. It would be very handy, to set up a personal limit of tab-sync. 25 tabs are too few for a workday. More would be helpful.
The main problem here is that setting the limit too high will lead to failures at a non-deterministic number of tabs, meaning the machine will fail to sync. bug 542315 will fix that. Mardak, any ideas on how to derive a reliable maximum number of tabs we can sync in the meantime?
Assignee: nobody → mconnor
Component: Firefox UI → Sync
Flags: blocking-weave1.1+
QA Contact: firefox → sync
We should know what's the maximum record size and some overhead on the record from metadata/encryption, so we could potentially fill up the payload to a certain string length instead of a fixed number.
We could do that, yeah, though I don't think the encryption overhead is deterministic enough to do it without a pretty significant fuzz factor. Will play with that idea tomorrow!
I never played with that idea, fail. Punting to Ed to load balance a little, basically want to a) make this a pref and b) figure out how high we can bump this.
Assignee: mconnor → edilee
The contents of an encrypted payload consists of {"encryption":"https://.....", "ciphertext":"..."} The encryption string plus other JSON overhead will be about 80 in our case, but it depends on the server url and username. The ciphertext will be of lengths that are multiples of the cipher block size, and additionally the ciphertext is base64 encoded, so 4/3.. 1.33% overhead. The maximum payload size accepted by the server right now seems to be 28KB (28672B). So /4*3 = 21504 then subtract off various JSON/padding/cryptowrapper overheads and the initial payload can be up to 21000 bytes with 500 bytes of leeway.
Attached patch v1Splinter Review
Attachment #427510 - Flags: review?(mconnor)
Comment on attachment 427510 [details] [diff] [review] v1 r=me, though I wonder if we want more bulletproofing against too-large payloads (I don't know how consistent the encryption overhead will be, so in theory this could still fail.
Attachment #427510 - Flags: review?(mconnor) → review+
Depends on: 539056
Target Milestone: 1.1 → 1.2
Whiteboard: [waiting on 539056]
Whiteboard: [waiting on 539056] → [has patch][has review][waiting on 539056]
Whiteboard: [has patch][has review][waiting on 539056] → [has patch][has review][ready to land]
http://hg.mozilla.org/labs/weave/rev/94a0edeb8883 Fit as many tabs as possible in 20000 characters by linearly estimating how many will fit then remove extras one by one.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [has patch][has review][ready to land]
Not sure how to best test this sanely by hand. Sounds like something for a unit test to check the boundaries
Flags: in-testsuite?
(In reply to comment #12) > Not sure how to best test this sanely by hand. Sounds like something for a > unit test to check the boundaries Probably the best way is to open 26 tabs and see if they all get synced. 26 should fit in 20000 characters since we're not syncing any tab history at the moment.
Verified fix on weave 1.2 across fennec and firefox 3.6.3
Status: RESOLVED → VERIFIED
Crossweave test added
Flags: in-testsuite? → in-testsuite+
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: