hoist-react
hoist-react copied to clipboard
Batch POSTs for activity tracking calls
For apps with a meaningful amount of activity tracking configured, the client can often send a burst of track calls, especially on initial load. While these are all quite quick, they are all separate HTTP requests and so compete for browser resources in that way. They also generally can clutter up the network tab when debugging.
It would seem appropriate to have the client collect a batch over a short interval - say five seconds - and flush them in bulk to the server. We have a similar pattern in place for pref changes.