Re: Waking up sleeping Java applications

From: Ben Jessel (ben.jessel_at_morpheme.co.uk)
Date: 12/05/03


Date: 5 Dec 2003 06:17:19 -0800

I would hazard a guess that windows always pages it out of memory when
you minimize it. However, the reason that C++ ms programs etc dont
have this problem is that they don't have virtual machine code and
state to restore. I'm guessing that javaw, java.exe and all the .dll's
that it relies on are pretty big. Not only that, the virtual machine
has to be loaded, the code that you are running on it is then stored.
With java you are running a program that is itself running a program.
I guess with MFC and Microsoft programs, the runtime environment is
part of the Microsoft Windows environment.

Also, could it be that the classloader refreshes all the classes once
an app becomes re-activated?

I think roedy even suggests himself on his site an idea for a project
where Java dll's are held in memory to enable faster app startup.

What is the time that it takes to initially load up an application
in terms of the time taken to re-activate the app?

Just a couple of thoughts...

"Wes Harrison" <nospam@home.com> wrote in message news:<mC_xb.681$MT1.16041@nnrp1.ozemail.com.au>...
> Why is it that when a Java application (esp. Swing) running under Windows
> 2000 has been minimized for a while, it needs time to "wake up"? In my
> experience, some of these apps can take up to 30 seconds on my PIII 500
> machine until they have refreshed their screen and will accept input. The
> longer they sleep, the longer it takes to wake up in general and while it's
> waking up there is a lot of disk activity.
>
> What's going on during this time? I don't think it's garbage collection.
>
> This has happened on every machine I have used Java on so I guess it's a
> feature but I don't think Java will succeed on the desktop until it has been
> resolved.
>
> Wes



Relevant Pages

  • Re: Ranting about JVMs default memory limits...
    ... It looks like Windows is indeed smart enough to use virtual address spaces that are per user process. ... on Windows each process has its own virtual address space. ... A lot of "Java is slow" seems to be the result of a GC running constantly to keep memory requirements to withing some ancient, ...
    (comp.lang.java.programmer)
  • Re: calling System.gc to suggest garbage collection
    ... Actually, the more I deal with Windows, the more I think GC time is taken up by a lot of "thrashing", because Windows swaps out the less frequently used memory, and Java "explores" that memory to determine whether to collect it or not. ... VMM's don't generally aggressively swap out memory pages, so as long as there aren't other processes that need the physical RAM at the same time your Java program is running, the Java heap should remain paged-in. ...
    (comp.lang.java.programmer)
  • Re: ath0 weak connectivity
    ... Limewire is java-based p2p app and java on Linux and FreeBSD requires a bit more resources than on Windows. ... I guess this is due to different strategies for memory management in the implementation of Java VM. ...
    (freebsd-stable)
  • Speicherprobleme
    ... Das Problem tritt u.a. auf, wenn ich versuche, eine Java Virtual Machine zu starten, aber auch bei anderen Applikationen. ... Could not create the Java virtual machine. ... (Cannot allocate memory) ...
    (de.comp.os.unix.linux.misc)
  • Re: windows virtual machine
    ... Microsoft is no longer allowed to provide its own Java ... Virtual Machine to Windows users. ... Microsoft Security Bulletin MS03-011 ...
    (microsoft.public.windowsxp.general)