Skip to content

core.xhr seems to leak resources #301

@dborkan

Description

@dborkan

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:
screen shot 2015-12-14 at 4 25 00 pm

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:
screen shot 2015-12-14 at 4 16 56 pm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions