Java's "keepWorkingSetOnMinimize" switch

Recently on the Netbeans mailing list somebody suggested that this switch could help in preventing bad operating systems like Winblows to swap out large Java applications when their windows are being minimized. I think most Winblows users will know this bad behaviour which makes our (large) Java apps so much more sluggish than need be.

The switch is:
-Dsun.awt.keepWorkingSetOnMinimize=true

I now use it with Netbeans and it does improve things nicely. Of course if there’s not enough RAM no tweak solves your missing RAM problem, but anyway the switch looks to be quite helpful.

I tried it with another Java application which I’ve got open all day: JEdit. It’s much smaller than Netbeans but still the switch makes things better. Since I’ve linked the double click of many textual file types to JEdit the loading of these files is faster with the switch when for example you previously hit winblows_key + M.

I’ve no idea which JDK version actually invented this switch but J2SE 1.5 supports it.

TBH, the simple answer is “never minimize anything in windows unless you’re absoluitely sure”, and it’s a lovely feature IMHO.

IME people who know realtiavely little about computers just get used to “not running a ‘big’ application and trying to do anythign else at once”; the rest of us of course work out its the act of minimizing that triggers the swapping, and so avoid minimizing pointlessly.

That’s the strategy I tend to follow as well. Minimizing IDEA tends to freeze my machine for at least 30 seconds. I’ve noticed that (at least on NT4) selecting “Minimize all windows” from the taskbar right click menu does not trigger the swapping, so that’s a workable way to get to the desktop as well.

You want to get to the desktop? :o

Seriously, I haven’t seen any point in that stupid thing since 1997 and IE4’s introduction of decent toolbars / shortcut bars. What’s the point? It’s more clicks away AND less user-friendly than the shortcut bar, and has no more useful structure than the start menu.

:slight_smile:
Yes and no. I agree that the desktop isn’t ideal, but it’s all NT has. No quick launch bar to be seen anywhere. It’s not perfect, but it’s still faster than scanning the start menu each time I want to launch an application.

I didnt know that minimizing triggers swapping, but i did wonder why the amount of mem used by programs goes down when the get minimized so i guess that explains it. :slight_smile:

My 1997 reference was because that was the year that windows NT 4 got a quick-launch bar :). So … I’m not sure what NT you’re referring to, or else my memory is screwed :(. MSIE 4 added quick-launch to NT, no?

the KeepResident Eclipse plugin documentation provides some interesting insight.

It seems we’re both partially right. I found a document explaining that this functionality only gets installed with IE4, not with IE5.x or 6. My machine has IE5.5 on it which probably explains the missing functionality. Given the bureaucratic environment I’m currently working in, there’s no chance I’ll ever get the sys admins to install that stuff unless I file a formal change request or something. Not worth the effort…