tamc/excel_to_code

Freeing memory is very slow

Opened this issue · 1 comments

tamc commented

With the 2050 pathway calculator example: calculating the pathway takes about 40ms. The reset method that frees allocated memory increases this to 120ms.

I haven't noticed a big hit on pathway calculation, but memory use has certainly dropped, and pretty much stabilised.

As I wrote elsewhere: memory use quickly stabilises just under 200 MB, and then very slowly rises by about 0.1MB or so, now and again. After a few dozen hits, it seemed to settle at 200.6MB, after rising to 200.7MB. A lot of hits later, it had risen to 205.9MB. So there would still appear to be a small leak, but it's pretty slow, and easily resolved with a restart of Rack once in a while - rare enough (on my server at least) to not be a critical problem.