Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VIT-7076: Buffer, dedup and batch execute background delivery callouts #226

Conversation

andersio
Copy link
Contributor

@andersio andersio commented Aug 2, 2024

iOS does not seem to like high CPU usage in background. Syncing multiple resources concurrently seems to be leading to our host app process being frozen.

Change it so that:

  1. We now only sync concurrently in foreground.
  2. In background, we sync resources serially with batching and prioritisation.
    • Callouts made within a 16ms window are batched up.
    • Within each batch, notified resources are deduplicated, are sorted by their priority, and are then scheduled for execution serially.

Copy link

linear bot commented Aug 2, 2024

Copy link
Contributor Author

andersio commented Aug 2, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @andersio and the rest of your teammates on Graphite Graphite

@andersio andersio force-pushed the 08-02-vit-7076_buffer_dedup_and_batch_execute_background_delivery_callouts branch 4 times, most recently from 92e0859 to 4260f32 Compare August 2, 2024 10:14
Copy link
Contributor Author

andersio commented Aug 2, 2024

Merge activity

  • Aug 2, 6:15 AM EDT: @andersio started a stack merge that includes this pull request via Graphite.
  • Aug 2, 6:18 AM EDT: Graphite rebased this pull request as part of a merge.
  • Aug 2, 6:19 AM EDT: @andersio merged this pull request with Graphite.

@andersio andersio changed the base branch from 08-02-vit-7076_refactor_how_resource_priority_is_modelled to main August 2, 2024 10:16
@andersio andersio force-pushed the 08-02-vit-7076_buffer_dedup_and_batch_execute_background_delivery_callouts branch from 4260f32 to 89b3aa4 Compare August 2, 2024 10:17
@andersio andersio merged commit 41fe9ac into main Aug 2, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant