Closed Bug 713939 Opened 14 years ago Closed 5 years ago

Provide a mechanism for fetch rate-limiting

Categories

(Firefox for Android Graveyard :: Android Sync, defect, P3)

ARM
Android
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: rnewman, Unassigned)

References

Details

Syncing involves the flow of records from a source to a sink: fetchSince is called on the source, onFetchedRecord callbacks pass the fetched records through the Synchronizer to the sink, and store is then called with the (transformed) record. Batching is performed by buffering on the far side of store. There is a potential issue with this. The speed of the fetch does not necessarily match the speed of the store. That is, a cursor over a local database could spew hundreds or thousands of records, which will then be buffered for upload over a slow 3G connection. Those buffered records will essentially be redundant copies of on-disk data. This configuration could result in memory exhaustion. Making some calls synchronous won't help with this: the source and sink are too decoupled. Some mechanism should be provided for the source and sink to communicate best-effort "are you ready?" information. For example, an isStoreReady method, which the fetcher could use periodically, or some batch parameter to fetchSince, which could pair with an onBatchHandled callback to allow the sink and Synchronizer to drive the fetching process.
Depends on: 730142
Product: Mozilla Services → Android Background Services
Blocks: 967996
Product: Android Background Services → Firefox for Android
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.