i m getting an performance hit at the start up of my desktop app ...i have used an image on the start up page which has a size of 49 kb and dimension 800 * 548
is because of this image my frame appears somewhat slow ....i mean when i start my app it takes 2 to 3 sec which is ok but when i click on a button which is the only button in that frame the next frame appears almost after 3 to 4 sec but after that every thing flows very smooth i mean as soon as i click the button
so what should i do to ?
naved momin wrote:i m getting an performance hit at the start up of my desktop app ...i have used an image on the start up page which has a size of 49 kb and dimension 800 * 548
is because of this image my frame appears somewhat slow ....i mean when i start my app it takes 2 to 3 sec which is ok but when i click on a button which is the only button in that frame the next frame appears almost after 3 to 4 sec but after that every thing flows very smooth i mean as soon as i click the button
so what should i do to ?
Without knowing more about your application and machine all we can do it guess but hey this is the Internet, there are a lot of guesses and opinions based on fewer facts.
My first suspicion is that you are bumping into memory limitations and the garbage collector is the culprit more than the image display by itself.
If this is the case bumping the size of the memory allocation pool and seeing if that solves it. The easy way is to include -Xmx on the command line tat starts the jar. eg: java -Xmx500M -jar myprog.jar
If that identifies the issue you have the fun task of figuring out how much memory you actually need.
Joe
It's not what your program can do, it's what your users do with the program.