Using a repeating timer to call Notifier.processPayloads every second is unnecessary. The error reporting queue can be notified when there is data present and schedule time to send data to the remote server instead of polling to see if there is data. The processing of error payloads is left async using setTimeout to avoid doing a large amount of work right when reporting an error and allows for batching.
Using a repeating timer to call Notifier.processPayloads every second is unnecessary. The error reporting queue can be notified when there is data present and schedule time to send data to the remote server instead of polling to see if there is data. The processing of error payloads is left async using setTimeout to avoid doing a large amount of work right when reporting an error and allows for batching.

Crisfole/rollbar.js,rollbar/rollbar.js