holidayextras / barometer

Framework agnostic browser performance metrics
MIT License
5 stars 5 forks source link

Keep track of open xhrs and only flush if there aren't too many #8

Open msaspence opened 7 years ago

msaspence commented 7 years ago

To help prevent barometer's requests holding up the application's requests we could keep track of open xhrs and only send the buffer if less than a specified number are open.

theninj4 commented 7 years ago

Currently we wait at least 5 seconds between flushing the buffer and timeout each XHR request after 4 seconds. It shouldn't be possible to ever have more than one request in-flight at once.

msaspence commented 7 years ago

I mean keep track of other requests so we don't complete with the application for what might be limited band width.

theninj4 commented 7 years ago

Ahh interesting. Great idea :+1: