Hum, to get down to the bottleneck, I tried this
Label label;
for(int i=0; i<1000; i++) {
label = new Label("label", Integer.toString(i));
};
Where label is a POJO that basically creates the following HTML
<span wicket:id="label">value of i</span> .... the constructor is not very complicated.
The same piece of code took 0 msec to run under Jetty, but 2 seconds under Glassfish...
I guess you are right, instantiation should take no time.... now I begin to question whether it could be an issue with classloader.... maybe classloader is just not caching the class.
[Message sent by forum member 'raysung78' (raysung78)]
http://forums.java.net/jive/thread.jspa?messageID=277081