This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 95351 - sun.awt.keepWorkingSetOnMinimize
Summary: sun.awt.keepWorkingSetOnMinimize
Status: NEW
Alias: None
Product: ide
Classification: Unclassified
Component: Performance (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-13 08:23 UTC by webhsw
Modified: 2012-04-03 13:45 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description webhsw 2007-02-13 08:23:56 UTC
Under Windows the property "sun.awt.keepWorkingSetOnMinimize" is false as
standard. The Netbeans launcher "nbexec.exe" sets this to true and this property
cannot be overrided by startup params (I found no way). This parameter set to
true may be o.k. on older and slower computers, but on a new and fast pc are no
problems in swapping from virt. memory and netbeans is not slow. 
The other greater problem is that a platform based user application also has no
way to override this parameter and the only way to override this parameter is to
patch the nbexec.exe.

Can you change the nbexec that the parameter "sun.awt.keepWorkingSetOnMinimize"
is overrideable?
Comment 1 Petr Nejedly 2007-02-13 08:34:57 UTC
-> launcher maintainer
Comment 2 _ rkubacki 2007-02-15 12:19:12 UTC
There is still possibility to rebuilt your own version (use cygwin tools).

Can you describe better why you think that new and fast PCs have no problems
with swapping? IMO if you swap to disk you have a problem even with new HW
because disk access is still much slower than RAM access. If you have a lot of
memory and the system does not need to swap to disk then you don't need to care
about this flag.

Unfortunately Java app with a large memory footprint is more sensitive to
working set trimming than native applications. I am not telling that this is not
valid RFE just want to know how strong are your reasons and whether you can
confirm what you have written.
Comment 3 webhsw 2007-02-16 09:23:10 UTC
I compared Netbeans with other IDE's like JDeveloper (Oracle), JBuilder
(Borland) and Eclipse. All these programs and also other Java applications are
freeing the used Operating Systems memory under Windows while minimizing. 
It cannot be that one programm like Netbeans uses and blocks 20-30% of the whole
 systems memory.
Of course, swapping to memory is faster than to disk, but I cannot find a
disadvantage and it is not slow when Netbeans frees memory while minimizing and
allocate it when maximizing.
Try it out and I believe you can see that there is no problem. 
My wish is to make this parameter overwritable!! 
At this moment, Platform based enduser programs also do not free memory while
minimizing ant this is the greater problem. Tell me, how should I explain my
endusers such a giant memory usage? The enduser said: Java is bad, it is slow
and it uses a lot of ram and I need a new and better computer for a simple
program and under .NET I don't have these problems. 
This is the reality!!!
Comment 4 _ rkubacki 2007-02-16 15:27:49 UTC
I am not sure if you correctly understand what this flag does. Basically the
application is not blocking any memory in OS (like pinning pages). It just gives
some hints to OS about good policy how to treat applications resources - when
and how much of of application it to swap to disk.

Maybe that other IDEs don't do this. For example Mozilla (and supposedly
Firefox) did the same trick.

What is a giant memory usage? It seems that the footprint itself can be a
problem rather than the way how it behaves when minimizing app. This flag is not
about freeing memory like doing GC and/or shrinking/growing heap size.
Comment 5 webhsw 2007-02-19 07:04:06 UTC
Maybe I do not know this flag in detail but in overview I think. But this is not
relevant for me. The effect is important. And the effect is, that Netbeans do
not give used memory free, when it is not used. Is is seen in the task manager. 
Mozilla is also such a "memory eater" like Java and Netbeans is extremly in this
case. Or how should I describe 250 - 300 MB memory in ram and the same again in
virtual memory? This is giant for me.
Of course, this flag is not a "memory freeing flag" but it can give a step to a
more tolerably Java application. 
I also cannot understand the steady increasing memory usage of Netbeans. Is
there a generally memory leak in Netbeans, or is this a Java problem? Do I have
to expect the same in my applications?
Java is an excellent and efficient language, but the memory management is
terrible and inefficient.
Comment 6 _ rkubacki 2007-10-30 18:08:35 UTC
Mostly performance related. Passing to Petr N.