simonbengtsson/jsPDF-AutoTable

Memory is not deallocating for autotable. js heap is increasing eventhough for small amount of data

Closed this issue · 6 comments

Memory is not deallocating for autotable. js heap is increasing eventhough for small amount of data

This will likely be fixed in v4 when we move away from storing things on the jsPDF instance and instead let user handle state. That said, any points on how to test this?

This issue will soon be closed since issues in this project are mainly meant to be bugs or feature requests. Questions are directed to stackoverflow.

@simonbengtsson yes just create an autotable with small data and a picture. (Picture isn't necessary) then keep refreshing for few times. You can see increase in js heap and it isn't deallocating memory.

This issue will soon be closed since issues in this project are mainly meant to be bugs or feature requests. Questions are directed to stackoverflow.

If you did the same with a simple google page you will find the heap keeps increasing but at some point it decreases, garbage collection doesn't happen immediately after page reload or after data is no longer used.

You can check for memory leaks by forcing garbage collection in the memory tab, if memory keeps increasing forever even after garbage collection then there's a problem, but I couldn't find any with a quick test, I will do a careful memory profiling and try to optimize the memory usage as possible as a part of the v4 plan.

This issue will soon be closed since issues in this project are mainly meant to be bugs or feature requests. Questions are directed to stackoverflow.