X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 28 Feb 2014 09:30 AM by  anon
resource leak problem: plenty of memory, big slowdown in code
 0 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
28 Feb 2014 09:30 AM
    I have an ENVI+IDL program that performs hierarchical classification by iteratively clustering images. The problem is that although the program is very fast for the first few hundred iterations, it gradually decreases in speed until each iteration takes (say) 100 times longer to execute. There are definitely memory leaks in the code that I need to (painstakingly) address. However, I wonder if the slowdown is caused by memory leaks or by some other resource leak because when the code runs slowly there are still great gobs (8 GB) of available memory. I ran memtest.pro but it didn't have any issues so I'm not sure if the probablem is due to memory fragmentation. I profiled the code and most of the execution time was taken up by loading and saving files. This would suggest to me that as time goes on, the time required to load and save files increases (but I don't know why that would be). It also seems that when the ENVI+IDL program runs slowly, my entire Windows 7 64 bit system runs slowly. For example, it takes a longer time (3 s) to load a PDF when the program has run for a long time. Can you speculate on what might be causing the slowdown so I can focus my efforts? Does a memory leak cause this kind of problem (even when there is lots of available memory)? Does memory fragmentation cause this problem (even though memtest.pro suggests that fragmentation is not serious)? Can a lack of file handles cause the slowdown? Any suggestions about causes, things to check, or strategies for finding the problem would be greatly appreciated. Is my best strategy to go after the memory leaks or is it more likely that there is some other issue?
    You are not authorized to post a reply.