Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak on frequent updates #345

Open
gregopet opened this issue Nov 13, 2015 · 4 comments
Open

Memory leak on frequent updates #345

gregopet opened this issue Nov 13, 2015 · 4 comments
Labels

Comments

@gregopet
Copy link

Hello,

We think we found a memory leak in js-data-angular. We use it to populate a dashboard that our client keeps open 24/7. After some time the client's machine stopped responding and we determined the problem to be a memory leak which we traced to this library.

I've put together an example here: http://razum.eu/memoryleaktemp/index.html

The heap size steadily increases over time while the number of cached objects remains the same. We think the original JSON array coming in is retained in memory, but we're not sure about that. The browser we tested with was Chrome.

The workaround for our application was to use Angular's $http to download the information and then inject it manually.

@jmdobry
Copy link
Member

jmdobry commented Nov 13, 2015

Thanks for the link, I'll take a look

@jmdobry jmdobry added the bug label Nov 13, 2015
@jmdobry
Copy link
Member

jmdobry commented Nov 13, 2015

Your demo uses a skipCache option, but neither js-data nor js-data-angular have such an option.

@gregopet
Copy link
Author

Ah yes, thank you - I was working from memory because we've been hunting for that bug yesterday. I remember we were trying different combinations of bypassCache and cacheResponse with findAll and refreshAll (though no combination helped), apparently things got mixed up a bit in my head :)

@jmdobry
Copy link
Member

jmdobry commented Nov 13, 2015

refreshAll() is the same as findAll(null, { bypassCache: true })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants