Closed Bug 1649525 Opened 5 years ago Closed 5 years ago

storage.sync can take many hours to synchronize changes

Categories

(WebExtensions :: Storage, enhancement)

78 Branch
enhancement

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: juraj.masiar, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0

Steps to reproduce:

I've build two extensions using this API and I've noticed that it can take several hours to synchronize after I save some changes.
To test this easily:

  1. using two browsers logged in to the same Firefox account
  2. install addon: https://addons.mozilla.org/addon/send_note_to_device/
  3. using the extension popup, send note from one device to another

Actual results:

It can take minutes or hours till the message comes.

Expected results:

I don't expect instant web-socket synchronization.
But I would expect for example 1 minute after last change (up-to 5 minutes), do the synchronization.

I think this is a great API because it's encrypted, totally private and doesn't need special permissions.
So having reliable sync could open more possibilities for addons.
My second extension using this API:
https://addons.mozilla.org/addon/private_notes/

This should be fixed in Firefox 79, where we replaced how this is synced.

Hello Mark, thank you for the info. That sounds like a great news.
Could you give me more details or point me to some document? I would love to know more.

There's a new implementation that uses the "regular" sync service instead of the special, custom one that was used before. All the gory details can be found in the bugs that bug 1634615 "depends on".

Thanks Mark!
I've been testing it in Nightly and it does seems to be better, although I'm still not fully satisfied - the submission to the cloud can take about 8 minutes and then syncing to other devices additional minutes...

Still much better than several hours, but still much worse than Chrome where sync is almost instantaneous (like up to 10 seconds).

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME

The problem we have is that some extensions write data very regularly (eg, think every tab switch) and we don't want to put our infrastructure under the load it would cause if we sync every time it changes. We will probably tweak this over time once we get a better handle on actual patterns.

You need to log in before you can comment on or make changes to this bug.