pento / Click-Sync

Syncs the link visited status between Chrome installs
GNU General Public License v3.0
5 stars 1 forks source link

Sync Throttling #7

Open pento opened 6 years ago

pento commented 6 years ago

The Sync API allows 1800 write operations per hour, or around 1 every 2 seconds. It's conceivable that we could run into this limit, particularly if a person is using a script to visit links.

Debouncing the sync write and garbage collection to only happen every 10 seconds will avoid hitting this limit.

pento commented 6 years ago

As this may include larger lists of URLs, we should ensure the data being written doesn't exceed the item limit (8192 bytes).

We can also add error handling to all our writes, in case we're unable to write to the sync area for some reason.