Looks to me like a pretty damn linear correlation of number of lines to memory used.
There is also 8K worth of code in both cases. So, basically my theory is that the globals you would allocate if for function was executed are counted twice, plus you retain the code itself which uses 8K. In the non-closure case that code would be gc'd at the end of the execution of the main chunk.
FuBar_PerformanceFu in a typical environment will report that Links is using something around 20K/s memory growth.
One thing Links does is hook the global function SetItemRef. This function is the only entry point of Links, but the memory growth is reported even when this function is not called. Weird.
FuBar_PerformanceFu in a typical environment will report that Links is using something around 20K/s memory growth.
One thing Links does is hook the global function SetItemRef. This function is the only entry point of Links, but the memory growth is reported even when this function is not called. Weird.
Yeah, I saw that thread. Clearly we don't understand what is happening. I know Prat hooks setitemref, and doesn't have the same problem links does, maybe we should compare what each does.
Yeah, I saw that thread. Clearly we don't understand what is happening. I know Prat hooks setitemref, and doesn't have the same problem links does, maybe we should compare what each does.
Does Prat hook SetItemRef via AceHook or another framework ? Maybe it's the framework that gets the blame (although it's then difficult to identify, as a framework get the blame for a lot of memory allocations).
Does Prat hook SetItemRef via AceHook or another framework ? Maybe it's the framework that gets the blame (although it's then difficult to identify, as a framework get the blame for a lot of memory allocations).
AceHook
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
The numbers for the closure versions:
The numbers for the main chunk versions:
There is also 8K worth of code in both cases. So, basically my theory is that the globals you would allocate if for function was executed are counted twice, plus you retain the code itself which uses 8K. In the non-closure case that code would be gc'd at the end of the execution of the main chunk.
FuBar_PerformanceFu in a typical environment will report that Links is using something around 20K/s memory growth.
One thing Links does is hook the global function SetItemRef. This function is the only entry point of Links, but the memory growth is reported even when this function is not called. Weird.
Yeah, I saw that thread. Clearly we don't understand what is happening. I know Prat hooks setitemref, and doesn't have the same problem links does, maybe we should compare what each does.
Does Prat hook SetItemRef via AceHook or another framework ? Maybe it's the framework that gets the blame (although it's then difficult to identify, as a framework get the blame for a lot of memory allocations).
AceHook