Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » A fix for Eclipse slowness on Windows
A fix for Eclipse slowness on Windows [message #267389] Tue, 17 August 2004 16:18 Go to next message
Eclipse UserFriend
Originally posted by: jwhaley.stanford.edu

Hi all,

Anyone who has been using Eclipse on Windows for more than a few days
has noticed its occasional sluggishness and lagging, where it won't
accept keystrokes or even redraw the window for up to 10-20 seconds.
This problem also exists on other large Java applications, and is
largely due to interactions between the Java virtual machine and the
Windows virtual memory manager. Windows has a tendency to preemptively
swap Java processes out of physical memory, even when there is still
plenty of physical memory available. This interacts very poorly with
Java processes, which do not have good locality and touch a lot of
memory. The problem is exacerbated when Java performs garbage
collection, which causes the Java process to touch lots of memory that
has been paged out to disk.

I wrote a simple plugin for Eclipse that uses two functions in the
Windows API - SetProcessWorkingSetSize() and VirtualLock() - to
encourage Windows to keep more of the Eclipse Java process in physical
RAM. The plugin adds a preference page where you can adjust the minimum
and maximum working set size (i.e. the amount of memory Windows is
supposed to keep in physical memory when the process is in use). You
can also enable the use of VirtualLock(), which will force Windows to
allocate physical memory for Eclipse, so even when Eclipse is minimized
it won't be swapped out. This is very effective in eliminating that
sluggishness you experience in Eclipse after minimizing or not using it
for a while.

It is available for download here: http://suif.stanford.edu/pub/keepresident

The plugin is tiny and very effective for me. It has completely
eliminated the lag and slowdowns I used to experience.

-John
Re: A fix for Eclipse slowness on Windows [message #267394 is a reply to message #267389] Tue, 17 August 2004 16:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: paull.NOSPAMcodetelligence.com

Sounds like a real useful plug-in for windows. I see there's no source for
the DLL and no license info on the plug-in. Is it a CPL plugin?

Paul

"John Whaley" <jwhaley@stanford.edu> wrote in message
news:cftp1t$5q9$1@eclipse.org...
> Hi all,
>
> Anyone who has been using Eclipse on Windows for more than a few days
> has noticed its occasional sluggishness and lagging, where it won't
> accept keystrokes or even redraw the window for up to 10-20 seconds.
> This problem also exists on other large Java applications, and is
> largely due to interactions between the Java virtual machine and the
> Windows virtual memory manager. Windows has a tendency to preemptively
> swap Java processes out of physical memory, even when there is still
> plenty of physical memory available. This interacts very poorly with
> Java processes, which do not have good locality and touch a lot of
> memory. The problem is exacerbated when Java performs garbage
> collection, which causes the Java process to touch lots of memory that
> has been paged out to disk.
>
> I wrote a simple plugin for Eclipse that uses two functions in the
> Windows API - SetProcessWorkingSetSize() and VirtualLock() - to
> encourage Windows to keep more of the Eclipse Java process in physical
> RAM. The plugin adds a preference page where you can adjust the minimum
> and maximum working set size (i.e. the amount of memory Windows is
> supposed to keep in physical memory when the process is in use). You
> can also enable the use of VirtualLock(), which will force Windows to
> allocate physical memory for Eclipse, so even when Eclipse is minimized
> it won't be swapped out. This is very effective in eliminating that
> sluggishness you experience in Eclipse after minimizing or not using it
> for a while.
>
> It is available for download here:
http://suif.stanford.edu/pub/keepresident
>
> The plugin is tiny and very effective for me. It has completely
> eliminated the lag and slowdowns I used to experience.
>
> -John
Re: A fix for Eclipse slowness on Windows [message #267402 is a reply to message #267394] Tue, 17 August 2004 17:24 Go to previous messageGo to next message
Eclipse UserFriend
Paul L wrote:

> Sounds like a real useful plug-in for windows. I see there's no source for
> the DLL and no license info on the plug-in. Is it a CPL plugin?

The source is at least visible at
http://suif.stanford.edu/pub/keepresident/xref/index.html
but I couldn't find a license either.

regards
--
___ ___
| + | |__ Georg Rehfeld Woltmanstr. 12 20097 Hamburg
|_|_\ |___ georg.rehfeld.nospam@gmx.de +49 (40) 23 53 27 10
Re: A fix for Eclipse slowness on Windows [message #267406 is a reply to message #267389] Tue, 17 August 2004 17:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: phil.dadabeatnik.com

"John Whaley" <jwhaley@stanford.edu> wrote in message
news:cftp1t$5q9$1@eclipse.org...
> Hi all,
>
> Anyone who has been using Eclipse on Windows for more than a few days has
> noticed its occasional sluggishness and lagging, where it won't accept
> keystrokes or even redraw the window for up to 10-20 seconds.


Er... no.... ?? (scratches head.....)

And I've been using Eclipse 3 since M5 last December...It's always worked
sweet as a nut.

PB
Re: A fix for Eclipse slowness on Windows [message #267414 is a reply to message #267402] Tue, 17 August 2004 18:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: paull.NOSPAMcodetelligence.com

Some of the source says:

// Licensed under the terms of the GNU LGPL; see COPYING for details.

Paul
"Georg Rehfeld" <georg.rehfeld@gmx.de> wrote in message
news:cftt8t$c0t$1@eclipse.org...
> Paul L wrote:
>
> > Sounds like a real useful plug-in for windows. I see there's no source
for
> > the DLL and no license info on the plug-in. Is it a CPL plugin?
>
> The source is at least visible at
> http://suif.stanford.edu/pub/keepresident/xref/index.html
> but I couldn't find a license either.
>
> regards
> --
> ___ ___
> | + | |__ Georg Rehfeld Woltmanstr. 12 20097 Hamburg
> |_|_\ |___ georg.rehfeld.nospam@gmx.de +49 (40) 23 53 27 10
>
Re: A fix for Eclipse slowness on Windows [message #267416 is a reply to message #267389] Tue, 17 August 2004 18:17 Go to previous messageGo to next message
Eclipse UserFriend
Dear John,

> ...
> I wrote a simple plugin for Eclipse that uses two functions in the
> Windows API - SetProcessWorkingSetSize() and VirtualLock() - to
> encourage Windows to keep more of the Eclipse Java process in physical
> RAM. The plugin adds a preference page where you can adjust the minimum
> and maximum working set size (i.e. the amount of memory Windows is
> supposed to keep in physical memory when the process is in use).

For a better usability would you please consider to show the sizes in
Megabytes instead of bytes?

regards

Georg
--
___ ___
| + | |__ Georg Rehfeld Woltmanstr. 12 20097 Hamburg
|_|_\ |___ georg.rehfeld.nospam@gmx.de +49 (40) 23 53 27 10
Re: A fix for Eclipse slowness on Windows [message #267418 is a reply to message #267402] Tue, 17 August 2004 18:18 Go to previous messageGo to next message
Eclipse UserFriend
Georg Rehfeld wrote:

> The source is at least visible at
> http://suif.stanford.edu/pub/keepresident/xref/index.html

Oops, sorry, you asked for the source of the DLL, I overlooked that.
Seems to be missing indeed.

regards
--
___ ___
| + | |__ Georg Rehfeld Woltmanstr. 12 20097 Hamburg
|_|_\ |___ georg.rehfeld.nospam@gmx.de +49 (40) 23 53 27 10
Re: A fix for Eclipse slowness on Windows [message #267424 is a reply to message #267418] Tue, 17 August 2004 18:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: paull.NOSPAMcodetelligence.com

Yea, I wasn't complaining about something free - just need to understand its
use, as we develop commercial products here.

Paul
www.codetelligence.com

"Georg Rehfeld" <georg.rehfeld@gmx.de> wrote in message
news:cfu0f8$g7f$2@eclipse.org...
> Georg Rehfeld wrote:
>
> > The source is at least visible at
> > http://suif.stanford.edu/pub/keepresident/xref/index.html
>
> Oops, sorry, you asked for the source of the DLL, I overlooked that.
> Seems to be missing indeed.
>
> regards
> --
> ___ ___
> | + | |__ Georg Rehfeld Woltmanstr. 12 20097 Hamburg
> |_|_\ |___ georg.rehfeld.nospam@gmx.de +49 (40) 23 53 27 10
>
Re: A fix for Eclipse slowness on Windows [message #267432 is a reply to message #267394] Tue, 17 August 2004 20:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jwhaley.stanford.edu

Paul L wrote:
> Sounds like a real useful plug-in for windows. I see there's no source for
> the DLL and no license info on the plug-in. Is it a CPL plugin?
>

Sorry about that; I've put a source distribution online and I've made it
clear that it is released under the CPL version 1.0.

At some point I may put the code in a public CVS repository so others
can contribute easily. Until then, please send me a patch if you have
any contributions.

-John
Re: A fix for Eclipse slowness on Windows [message #267444 is a reply to message #267432] Tue, 17 August 2004 21:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: paull.NOSPAMcodetelligence.com

Thanks. This is a real issue with Windows and Eclipse, I'm looking forward
to giving it a try - I get tired of watching the VM swap stuff back and
forth in the middle of me trying type.

Paul;
www.codetelligence.com
"John Whaley" <jwhaley@stanford.edu> wrote in message
news:cfu7da$o4b$1@eclipse.org...
> Paul L wrote:
> > Sounds like a real useful plug-in for windows. I see there's no source
for
> > the DLL and no license info on the plug-in. Is it a CPL plugin?
> >
>
> Sorry about that; I've put a source distribution online and I've made it
> clear that it is released under the CPL version 1.0.
>
> At some point I may put the code in a public CVS repository so others
> can contribute easily. Until then, please send me a patch if you have
> any contributions.
>
> -John
Re: A fix for Eclipse slowness on Windows [message #267471 is a reply to message #267389] Wed, 18 August 2004 04:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

John Whaley wrote:

> Hi all,
>
> Anyone who has been using Eclipse on Windows for more than a few days
> has noticed its occasional sluggishness and lagging, where it won't
> accept keystrokes or even redraw the window for up to 10-20 seconds.
> This problem also exists on other large Java applications, and is
> largely due to interactions between the Java virtual machine and the
> Windows virtual memory manager. Windows has a tendency to
> preemptively swap Java processes out of physical memory, even when
> there is still plenty of physical memory available.

You can disable this behavior by adding the following entry to [386enh]
section of your system.ini:
ConservativeSwapfileUsage=1

Dani

> This interacts very poorly with Java processes, which do not have
> good locality and touch a lot of memory. The problem is exacerbated
> when Java performs garbage collection, which causes the Java process
> to touch lots of memory that has been paged out to disk.
>
> I wrote a simple plugin for Eclipse that uses two functions in the
> Windows API - SetProcessWorkingSetSize() and VirtualLock() - to
> encourage Windows to keep more of the Eclipse Java process in physical
> RAM. The plugin adds a preference page where you can adjust the
> minimum and maximum working set size (i.e. the amount of memory
> Windows is supposed to keep in physical memory when the process is in
> use). You can also enable the use of VirtualLock(), which will force
> Windows to allocate physical memory for Eclipse, so even when Eclipse
> is minimized it won't be swapped out. This is very effective in
> eliminating that sluggishness you experience in Eclipse after
> minimizing or not using it for a while.
>
> It is available for download here:
> http://suif.stanford.edu/pub/keepresident
>
> The plugin is tiny and very effective for me. It has completely
> eliminated the lag and slowdowns I used to experience.
>
> -John
Re: A fix for Eclipse slowness on Windows [message #267479 is a reply to message #267471] Wed, 18 August 2004 05:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: phil.dadabeatnik.com

"Daniel Megert" <daniel.megert@gmx.net> wrote in message
news:cfv40h$tc0$1@eclipse.org...
>
> You can disable this behavior by adding the following entry to [386enh]
> section of your system.ini:
> ConservativeSwapfileUsage=1
>
> Dani


Only works for Win 98 / ME

PB
Re: A fix for Eclipse slowness on Windows [message #267481 is a reply to message #267416] Wed, 18 August 2004 05:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jwhaley.stanford.edu

"Georg Rehfeld" <georg.rehfeld@gmx.de> wrote in message
news:cfu0cd$g7f$1@eclipse.org...
>
> For a better usability would you please consider to show the sizes in
> Megabytes instead of bytes?

I've changed this, please take a look at the latest version.

-John
Re: A fix for Eclipse slowness on Windows [message #267485 is a reply to message #267479] Wed, 18 August 2004 05:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

Phillipus wrote:

>"Daniel Megert" <daniel.megert@gmx.net> wrote in message
>news:cfv40h$tc0$1@eclipse.org...
>
>
>>You can disable this behavior by adding the following entry to [386enh]
>>section of your system.ini:
>>ConservativeSwapfileUsage=1
>>
>>Dani
>>
>>
>
>
>Only works for Win 98 / ME
>
>
I found the hint in many XP forums. Can you point to an MS document that
says otherwise?

Thanks,
Dani

>PB
>
>
>
>
Re: A fix for Eclipse slowness on Windows [message #267498 is a reply to message #267485] Wed, 18 August 2004 06:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jwhaley.stanford.edu

> >>You can disable this behavior by adding the following entry to [386enh]
> >>section of your system.ini:
> >>ConservativeSwapfileUsage=1
> >
> >Only works for Win 98 / ME
> >
> I found the hint in many XP forums. Can you point to an MS document that
> says otherwise?
>

I've tried this flag and it does not appear to have any effect under Windows
XP. In any case, it does not solve the problem with Eclipse when it is
minimized. (I have screenshots proving this.)

There is, however, a DisablePagingExecutive flag for Windows XP that is
similar. However, it only effects device drivers and kernel-mode system
code.

http://www.microsoft.com/windows2000/techinfo/reskit/en-us/d efault.asp?url=/windows2000/techinfo/reskit/en-us/regentry/2 9931.asp

Here is a thread where they discuss this in detail:

http://www.xtremepccentral.com/forums/showthread/t-6940.html

-John
Re: A fix for Eclipse slowness on Windows [message #267504 is a reply to message #267485] Wed, 18 August 2004 06:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jwhaley.stanford.edu

> I found the hint in many XP forums. Can you point to an MS document that
> says otherwise?

FWIW, here is the official MS document that says it is only for 98/ME, and
not Windows 2000 series:

http://support.microsoft.com/default.aspx?scid=http://suppor t.microsoft.com:80/support/kb/articles/Q223/2/94.ASP&NoW ebContent=1

-John
Re: A fix for Eclipse slowness on Windows [message #268265 is a reply to message #267389] Mon, 23 August 2004 12:21 Go to previous messageGo to next message
Eclipse UserFriend
>Anyone who has been using Eclipse on Windows for more than a few days
>has noticed its occasional sluggishness and lagging, where it won't
>accept keystrokes or even redraw the window for up to 10-20 seconds.
>This problem also exists on other large Java applications, and is
>largely due to interactions between the Java virtual machine and the
>Windows virtual memory manager. Windows has a tendency to preemptively
>swap Java processes out of physical memory, even when there is still
>plenty of physical memory available. This interacts very poorly with
>Java processes, which do not have good locality and touch a lot of
>memory. The problem is exacerbated when Java performs garbage
>collection, which causes the Java process to touch lots of memory that
>has been paged out to disk.

There seems to be a property for the minimize|maximized problem, I am
just trying it, but this should work for AWT/Swing apps I think.
Do not know if SWT handles any of the suggested WM_ messages, but it
seems to be useful for SWT too.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5043070

martin
Re: A fix for Eclipse slowness on Windows [message #272666 is a reply to message #267389] Fri, 24 September 2004 15:38 Go to previous message
Eclipse UserFriend
Originally posted by: barlock.usx.ibmx.com

Any recommendations for good values to use for the min/max working set size?

Chris
Previous Topic:CVS trouble
Next Topic:Adding a Jframe inside a view
Goto Forum:
  


Current Time: Sun Jun 08 14:18:13 EDT 2025

Powered by FUDForum. Page generated in 0.06324 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top