A fix for Eclipse slowness on Windows [message #267389] |
Tue, 17 August 2004 16:18  |
Eclipse User |
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06324 seconds