majestic @ Totalcmd.net
7MB memory usage?
Gigantic for such app
majkinetor @ Totalcmd.net
It doesn't use more then 3.5MB here.
majkinetor @ Totalcmd.net
OK, majestic you were right
It uses about 7MB of memory until it is Reloaded (from the tray menu). After that it drops to 2.5-3.5MB, so it is good advice to reload it after starting it. I might add this programaticaly.
This is some Windows unknown behavior. Reloading will execute another instance of AHK and close the prvious one, just like you open another FavMenu and closed previous after that. Why does that cuts the memory to half you will have to ask MS support

Also, you have to consider that this is a script (exe version is compiled AHK script). THerefore, it can not have the same minimal performance like it would be in C language. AHK by my knowledge outperformed all other scripting languages, so I guess it can not be better then this.
majkinetor @ AHK
I noticed that when you run any script for the first time, it eats much more memory then after you Reload it via internal command.
I tried on several different scripts and behavior is the same: Used memory is cut to half.
This is very strange behavior since Reload will spawn another AHK process and close itself so I don't know how that differs from cold start
Chris @ AHK
It could be that Reload results in less memory shown because the second instance shares memory (system resources) with the first instance.
If you're using Task Manager to gather these memory statisitcs, I don't think its "Mem Usage" column is an accurate reflection of how much memory a process has actually consumed. For details, see http://www.autohotkey.com/forum/viewtopic.php?p=24247#24247
I am using TaskInfo & PRocess Explorer. Both report the same.
majkinetor @ AHK
Must be some weird Windows behavior.
This is info from running my FavMenu script (used as merging example). This script is big but it does nothing on startup except checking for few config enteries in ini file. Then it waits for the hotkey to do the work. I just launch (without hotkey call) and then reloaded. This is what I got:
Code:
Code: Select all
Physical Memory | First Run | Reloaded
------------------------------------------------------------------
Working Set | 5.324 | 2.512
WS Private | 2.452 | 1.668
WS Shareable | 2.872 | 844
WS Shared | 2.824 | 836
Peek | 5.324 | 4.504
I checked the code and there isn't very much different between reload-mode and normal mode.
Rather than using "Working Set", perhaps it would be more accurate to use "VM Size" as shown by Task Manager.
majkinetor @ Totalcmd.net
After longer analysies of memory problem this is to take as a final note about it:
It is determinted by several other excellent programmers and me, that even the smallest windows application consume about 5MB of memory. We did examples in Watcom compiler (the litest of C compilers) creating 5KB exe files that do nothing. TaskManager reported 5MB MEM usage. It appears to be some internal memory alocation to handle security attributes, users rights or whatsoever, in any case, memory reported is not accurate. Favmenu itself uses about 30KB memory internaly and AutoHotKey scripting language according to my talk with the author eats memory far far from 5MB. Also system dll-s are counted, so Favmenu uses 2.5MB when first run and 1.6 MB when reloaded
So, it appears to be false alarm...
You can ofcourse see processes in TaskManager that eat as low as 0.5MB RAM, but those are services or system drivers witch have entirely different SDK then normal windows application.
Windows Explorer itself is eating 25MB RAM here without any addons, witch is "Gigantic" for such app
