DIGG IT!
7
Comments
Published
Wednesday, September 06, 2006
at
3:05 PM
.
Windows XP does not like apps running in a virtual machine. In all .NET and JAVA apps I have found that Minimizing and Maximizing them forces WinXP to clean up memory allocated to the application process. Doing this with Flex Builder 2 will drop about 300MB of RAM out of the Java/Eclipse process instantly. If you are seeing things act sluggish, drop Flex Builder to the TaskBar and back. Ted on Twitter - @AdobeTed
Ted on Adobe Groups
Ted on LinkedIn
Ted on Facebook
Ted at Adobe
Come on over to Mac, the water is fine. While you are at it, bring Flex Builder for Mac with you :)
Mac and it's OSX is so outdated. Linux is the future. Come to Linux and bring Flex Builder with you...
You can use the Krysoft eclipse plugin to do your garbage collection for you. It even gives you a console to view your mem usage etc.
do an new find and install with the remote site: http://www.kyrsoft.com/updates/
It will install memmonitor and stmemmon.
Someone on the MM flex beta list got me onto it, and I've been real happy with it so far.
BTW - the minimise trick works with flash too :)
Kyrsoft - very nice ... Any recommendations for settings?
Kevin.
I left it at default (128Mb / 5min), and I haven't had any probs so far.
I think your settings will depend on your machine specs and how hungry you want flex to be able to be :)
(ie if you are doing mainly flex work and not running many other progs at the same time, you could probably up the auto GC size, but I tend to have too many other apps running at the same time)
Great Trick :)
Do you know if that is true even for FB2 eclipse plugin version? (don't think so...)
Of course, it doesn't really have anything to do with Windows XP not liking virtual machines (as Windows doesn't know it's a virtual machine). It has to do with the fact that both .NET and Java use garbage collection -- which of course you already know -- and that results in a pattern of allocations (and eventual deallocations) that suggest to the OS that the app could use some more virtual memory.
Let me guess... you're measuring the memory using task manager? The reason it shrinks when you minimize is because that number is how much memory the OS has potentially reserved for the app (kinda like a pre-allocation in the address space). It doesn't actually use any physical memory yet, which is why it can instantly be deallocated when the app is minimized -- it's all being *potentially* backed in virtual memory (the swap file on disk)...
In other words, these apps aren't actually allocating this much memory and the OS isn't actually giving it to them (at least not in a performance-impacting way).
The misconception is incredibly common, though, as I used to have users complaining constantly that they couldn't understand why our custom gamedev app consumed hundreds and hundreds of megabytes of memory for very small projects. Of course, when we hooked our memory allocators we couldn't find those hundreds of megs of memory... because we never allocated them.
There's some discussion of this out on the web somewhere... I used to be quite clued in on it, but that was several years ago. I just remembered the basics: the amount of memory listed in Task Manager does not correspond with what most us are thinking when we look at it, and it's nowhere as bad as we think.