Hi,
have to report about the solution.
My fault was, that I had two classes with the same name in testing and source - and of cause, I changed the wrong one.
Took me lots of log-entries to get rid of the testclass, which I already had forgotten.
After renaming the testclass and changing the right one it shows, that constructor of SimpleApplications child is the right place for AppSettings. Even setup after constructor from JPanel works, but …
… starting without audio did not change anything. Stil about 30% cpu load. So I looked for a profiler, that I can read without magnifiers …
I read, that netbeans has a profiler integrated …
I was astonished about the rising memory consumption. I thought, that everything should be idle …
Then I looked at my timer thread and realized the plenty stack objects and the overall usage of quoted strings …
So I started to change things. Convert stack variables to members, made functions synchronized, convert strings into static constants …
Had to touch nearly every class …
… and was shocked after the first run after the “optimization”:
For me this looks quite worse than first picture. But linux system-monitor says the opposite is true. The ugly picture now causes a system load of about 4% (with jme3 active!), whereas the smart one consumed about 30% (at higher cpu-clock)
I don’t really understand that. Without jme my app took about 4% - may be my memory wasting was close below the limit and with jme I hit the limit for higher cpu request.
Now with reworked code, I’m way below the limit and stay below the limit with jme activated.
That’s the only way, I can interpret my observations.
What stil causes pain in the head is the rising memory consumption.
Diagram from neatbeans is misleading here. It suggests, that gc cleares the memory to always the same level.
But linux-systemmonitor tells a different story. After short runtime, my app has doubled the memory consumption. Leaving the app idle for some time, stil raises the used memory.
But I have no idea how to get rid of this.
Sadly the profiler does not tell the creator of the objects.
I think, that memory consumption could be a problem at estimated runtimes of 24h or more - don’t know, when the app will run out of memory.
Would like to hear your thoughts/impressions.