- Windows 8
- Firefox v. 53
- iMacros for Firefox v 8.9.7
Script
The script is created with JavaScript. It reads a CSV file from the system that contains 100 entries. The entries from the file are read in a loop. The URL specified in the file is opened. After the URL is opened, a Screenshot of that page is saved on the system. The entire process is repeated till the end of the file is reached.
Test 1 - iMacros and Firefox
I ran the script normally and opened the Task Manager along side with it. As the script ran, I noticed that the amount of CPU consumed used reached 100% and the amount of memory consumed by Firefox started increasing. The memory slowly went from 34% up to 99% as the loop continued to run. Once the memory consumption reached critical level, I decided to stop the loop. Even after stopping the script, the total memory consumed by Firefox was still stuck at more than 2,500 MB. When it started, the memory consumed was around 112 MB and in the end, it reached almost 2.5 Gigs

This led me to believe that Firefox is hogging up Memory which is causing it to crash. So, I decided I will change the browser to Pale Moon and see if the results were the same.
Test 2 - iMacros and Pale Moon
I repeated the same experiment with Pale Moon and iMacros to see if I was getting the same results. After running the script, I noticed the same pattern. So, I thought that I need to clear the Memory consumed by Firefox so that it remains free.
Test 3 - iMacros, Firefox and Firemin
I did some research and came across the tool - "Firemin" which frees up the memory consumed by Firefox at really fast intervals. I set it up so that as soon as the Memory consumed by Firefox reached 200 MB, it should clear the memory consumed. I set the interval at one second so that it checks the same each second. Along with that, I also disabled Cache from Firefox so that it does not save anything from the web page as well.
I ran the same script again and noticed something really unusual. Firefox was running the script and after every few seconds when the Memory consumed reached the threshold limit, it would clear the memory and bring it to around 100 MB. I was happy that I had finally solved the problem of Firefox memory.

Sadly however, I noticed the Memory % still rising even after the memory was cleared.

Conclusion
This has led me to believe that the actual culprit is the iMacros extension that is taking up memory somewhere and it is not being cleared. May be the team already knows about it and they have fixed the problem in their future updates. But, searched for Memory leaks on iMacros on Google and did not find a satisfactory result, so I created this post.
I would like to know if someone else is facing the same problems too. I would really like to figure out a solution to this together. I think that the memory usage by iMacros might not be managed properly, but I am just a noob

Sorry for such a long post
