keysync icon indicating copy to clipboard operation
keysync copied to clipboard

Avoid unneeded work when multiple API syncs are requested

Open mcpherrinm opened this issue 8 years ago • 1 comments

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 avatar Jun 13 '17 01:06 mcpherrinm

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.

mcpherrinm avatar Jun 13 '17 01:06 mcpherrinm