SmartAssembly memory management

2 answers

Interesting.

A 2007 review contains the following:

{smartassembly} uses several different methods to reduce memory usage.

We asked the {smartassembly} developers for some of the specifics, and they told us that, by default, the CLR reserves a ton of memory for .NET collectors - whether or not they ask for it. So {smartassembly} intelligently detects when the CPU is in standby mode (or near it) and increases or decreases the amount of reserved memory for your assembly in accordance with its requirements - an β€œautomated” GC in a sense, except that the memory can be either not to be ever in use.

In the same vein, {smartassembly} (with predominant access to the source code thanks to the .NET method developed) marks any and all classes that do not have detectable "child" classes that inherit from them as "sealed" ones, thereby reducing memory and processor used by the CLR at runtime to determine which functions to perform are available for other classes and libraries.

In the same review, there is a pair of before / after screenshots showing the application from 8M to 420K. This suggests that in fact it simply reduces the working set of the application, and not the real memory requirements. The same "optimization" appears if you minimize the application. It does not take up less memory. I do not believe that the .NET desktop platform can work with 420K.

The automatic compaction function is interesting - I don’t see that it helps, besides the search for virtual methods. I doubt it is really significant, but of course I did not compare it.

So, nothing convincing, but I doubt that he does everything that I especially want.

+4
source

Maybe I'm wrong, but it seems to me that SmartAssembly is pushing data to the page file. If you select CommitSize and PF delta columns in the task manager, you will see that although the WorkSet reduces the size, the commit size remains almost the same. If you then try to access something in your application, you will see many page errors.

If this behavior is "Memory Optimization", then I think that this name does not correspond to this function, and it should simply be called "De-optimization", since the cost of accessing the page file can significantly reduce performance.

Am I really mistaken in this interpretation?

0
source

All Articles