Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Avoid unneeded work when multiple API syncs are requested #31

Open
mcpherrinm opened this issue Jun 13, 2017 · 1 comment
Open

Avoid unneeded work when multiple API syncs are requested #31

mcpherrinm opened this issue Jun 13, 2017 · 1 comment
Assignees

Comments

@mcpherrinm
Copy link
Contributor

mcpherrinm commented Jun 13, 2017

If two API requests come in to sync at the same time, we shouldn't sync twice. This is made a bit easier because we serialize syncs on a lock.

I'm thinking we do something like have a request queue, and new requests can be merged into pending ones if they're overlapping.

This is probably a pretty minor optimization but may increase complexity a lot. Not 100% sure it's worth it (at least not yet)

@mcpherrinm mcpherrinm self-assigned this Jun 13, 2017
@mcpherrinm
Copy link
Contributor Author

I'm thinking of a case where the server is overloaded and sync requests are backing up -- if we can avoid doing them, that can help the server overload in addition to returning to the client faster.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant