gecko-dev/mobile
Grigory Kruglov 3d46434d5e Bug 1408710 - Serialize RecordsChannel r=rnewman
This patch does two things:
- serializes flow of records through the RecordsChannel
- simplifies the batching logic

The two are connected: rather than queuing records in ConcurrentLinkedQueue, we now buffer
downloaded records in an ArrayList, and deliver them to the receiving repository all at once.

Doing this work right at the channel level lets us kill off the buffering middleware.

An addition of a NonBufferingSyncStage lets individual SyncStages use a RecordsChannel which
doesn't perform any kind of buffering. Prior, stages did this by wrapping their receiving repositories
in the buffering middleware.

The main goal is to speed up the flow of records, keep within the same memory footprint
and do some simplification in the process.
This patch explicitly does not address the delegated nature of fetch and store, which is now largely irrelevant.

MozReview-Commit-ID: J2afmgr1Td1

--HG--
extra : rebase_source : 62f5f7940bb8db9a18704edfd0b9cb38eb410b71
2018-02-26 15:12:34 -05:00
..
android Bug 1408710 - Serialize RecordsChannel r=rnewman 2018-02-26 15:12:34 -05:00
locales no bug - Bumping Fennec l10n changesets DONTBUILD r=release a=l10n-bump 2018-02-14 03:40:46 -08:00