-
Notifications
You must be signed in to change notification settings - Fork 52
Description
It is looking to me like core.xhr might be leaking resources.
Some background: we were noticing if we left uProxy logged into the GitHub social provider, our Chrome app would crash when left running overnight. We found that if we changed our polling interval (which makes several core.xhr requests) to be less frequent we could run longer before the app crashed, or if it was shorter it would crash faster (10 ms polling interval crashed in a few minutes).
We are currently trying XMLHttpRequest instead of core.xhr and it hasn't crashed yet. Also based on the timeline tab in the Chrome debugger, it appears to use less resources.
Here are some graphs from running uProxy in Chrome, logged into GitHub with polling every 100ms.
This graph shows that resource usage keeps increasing when we use core.xhr:

And here is another graph where I replaced the main core.xhr call with XMLHttpRequest (there may be a few other core.xhr calls still in there). You can see it uses far fewer resources (head and listeners) over the same period of time:
