I'm submitting a ... (check one with "x")
[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Plunkr Case (Bug Reports)
http://plnkr.co/edit/FXJ77oxdDqRkieGAWUiT?p=preview
Current behavior
When the underlying data source of the DataTable component with column template gets updated frequently (by a socket push or polling) there is a memory leak and the browser gets crashed eventually. Try Plunker link above to see the issue in action
Expected behavior
Expected behavior is that there is no memory leak.
Minimal reproduction of the problem with instructions
Run the issue demo http://plnkr.co/edit/FXJ77oxdDqRkieGAWUiT?p=preview.
The 30 sec timer in the code keeps updating the data in the DataTable
In Chrome browser take Heap snapshot every time the data gets updated on the DataTable
You would notice the heap memory increase substantial and the browser eventually crash.
Angular version: 2.4.1
PrimeNG version: 1.1.4
Browser: [Chrome 44.0.2403.125]
Language: [ TypeScript 2.0.10 |ES6]
Any update on this?
@cagataycivici did you get chance to try the Plunker Case link?
We have the same issue. A crashing browser is a show stopper. Can't move ahead with PrimeNG as a choice for our application with this. Hope this gets fixed soon.
@cagataycivici This is really for important, even I am facing the same issue. Please help to get this done. thanks ..
Indeed, this bug is a showstopper. Unfortunately, our show is live as we have an primeng-powered angular app being used by thousands of customers everyday that has this problem. It refreshes live data every 5 minutes (should be every minute, but...this bug forced us to increase that time).
While this is being fixed, we have two options:
1) Replace PrimeNG
2) Do an automatic window.location.reload() every 50 minutes (10 refreshes) in order to free heap!
We are currently going with option 2 in hopes that someone will post a fix or workaround here.
The rate at which this problem eats memory is jaw-dropping. What can we do to make this a priority? Does crowd-funding help? What are others doing to work-around this problem?
I read through the bugs here and most seem trivial compared to this one.
Thanks to vijayrajaram for providing a test case for easily reproducing the problem.
UPDATE: I found this: http://www.primefaces.org/support and now understand how to support this team financially.
any update on this ?
It puzzles me what other issue could be more important for Primefaces than a show stopper bug where it leaks memory and die !!
Exactly. I'm perplexed by the lack of attention to this bug.
Do you guys think this is caused by having a column template? if we remove the template, does the leak go away?
That's right. I do not see memory leak issue if I remove the template. But unfortunately, my app badly need to use templates.
Well, that's an important clue for the developers.
Actually, I'm not sure how to do anything useful without templates? Is there a way to inject data into the table without the templates?
Anyone tried 2.0_rc1 to see if per chance they fixed this there?
Just tried 2.0.0-rc.1. The memory leak issue is still there. I don't think it got fixed as a side-effect .
Thanks for trying 2.0.0-rc-1.
Anyone found a good replacement for realtime data?
ag-grid-ng2 looks promising. I would be evaluating it later this week.
Thanks for the pointer. I just quickly refreshed this example 50 times with absolutely no increase in heap:
https://www.ag-grid.com/javascript-grid-refresh/example3.html
So, that's a good sign.
Fixed for 2.0.1, thanks to @yar3333
what does this mean? Is it possible to get this fix now?
Looks like we are waiting for two more issues to be completed before they release 2.1: https://github.com/primefaces/primeng/milestone/51
Hi yar3333, does '... tested only in limited cases' mean that there are likely still leaks in the component?
@skuby2 Leaks are definitely gone away in my case and component works great.
Most helpful comment
We have the same issue. A crashing browser is a show stopper. Can't move ahead with PrimeNG as a choice for our application with this. Hope this gets fixed soon.