Shutdown performance

Hello there

I have a problem shutting down my application. Sometimes it exits at once but most of the time it takes forever to exit. I noticed, that I have no problems, when I switch off the vertical sync in my driver settings. This is no option, since my animation is WAY too fast in 2000 FPS :wink:

Here is my shutdown code


            System.out.println("Shutdown Rendering");
            animator.stop();
            mainFrame.setVisible(false);
            mainFrame.dispose();
            System.out.println("Exiting");
            System.exit(0);

which seems to be straight forward…

My machines specs are:
Athlon 2600+, Win Xp, GF 5900XT, latest drivers, no overclocking (at the moment :slight_smile: )

Has anyone an idea how to solve this ? One sollution seems to disable vsync for cleanup, but I could not find any way to do it in OpenGL.

To the JOGL developers: what could be the problem here. Could something be changed in the GLCanvas shutdown code ?

regards
Mathias

It’s definitely the dispose call. Remove that and all will be well. Dispose has been slow since the dawn of western civilisation… :slight_smile:

Thanks for the answer, but unfortunatly I tried this before posting. I assume the Frame is disposed anyway on System.exit(), so removing it did not have any effect :frowning:

Ok, that’s odd… Can you see both println’s before the delay?

Hmm… it seems the delay only occurs when the app is started from my IDE (Intellj Idea), so I switch to ant for now.

[quote]Hmm… it seems the delay only occurs when the app is started from my IDE (Intellj Idea), so I switch to ant for now.
[/quote]
That’s the reason I usually launch my applications from command line… :slight_smile: