I;ve been writing a Java swing applet that is to be deployed in a browser (which ios pretty normal for applets, granted). It uses Java 2D for
Anyway, I have a test harness for development purposes, which runs it as a desktop app.
Based on exactly the same test data, the Test Harness version has a heap total size 18 Meg; this is based on drawing about 7000 objects on a Java 2D canvas with perhaps 30,000 coordinate pairs, plus other bits and pieces, so an 18 Meg heap is big but just about understandable. Total app size is 40 Meg.
Now I run exactly the same code as an Applet, via IBM Websphere.
The delta in memory for the plug-in rises to about 160Meg! Somehow the same java code is managing to use 10 times the memory.
The old CBM64 programmer in me is not particularly impressed at the first figure - it's an order of magnitude bloated IMO, but the second is amazing - does anyone have a clue what could possibly be using so much memory? I'm looking with VisualVM, and it's helpfully putting things like Object, char[] and String as the memory hogs, none of my classes come close.
Interestingly, Float and Double seem to take up exactly the same amount of memory (16 bytes each.).
My main guess right now is that the data retrieval using SOAP is causing the huge spike in memory use, and for reasons unknown the SOAP XML is being retained instead of GC'd.
Does anyone else out there have a clue as to what is going on here?