Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#284 This changes the parameters for our
RefreshOperations
, which are the operations we use to copy data from the go-ssb log into SQLite. We were doing very tiny ~1 second refreshes every 17 seconds in the background. And if the user did a pull-to-refresh gesture they could end up waiting 30 seconds for a refresh in the worst case.These values seemed backwards to me. Maybe the background refreshes were so small because we were worried about background operations affecting the UI thread. But after doing some testing I think this gives a much better experience. Now we spend up to 30 seconds fetching up to 45,000 messages for background refreshes. If the user pulls-to-refresh we pull in up to 15,000 new messages in ~10 seconds. The vast majority of the time these refreshes will happen much more quickly (less than a second). But when you get a ton of new messages the app will now work much harder in the background to get SQLite up to date.