Home:ALL Converter>Huge difference in number classes loaded into memory by Jetty 8 and Jetty 9

Huge difference in number classes loaded into memory by Jetty 8 and Jetty 9

Ask Time:2014-03-07T14:30:11         Author:Sudarshan

Json Formatter

I am running jetty-distribution-8.1.5.v20120716 and jetty-distribution-9.1.2.v20140210 on a windows 7 machine.

And i find that with Jetty 9 the number of classes loaded into memory are a lot more than the number of classes loaded by Jetty 8 especially after the web app has been deployed.

The web application is developed using Spring 3.X and Hibernate 4.1.X, just in case that could have a effect on things

Below are the numbers i have observed, this causes my first request to be responded slowly, and more over i am just curious to know why this happens

In case you are not able to download Jetty 8 you can download it from here

PFA images of my JConsole showing the number of classes loaded in each case

Jetty 8

Without web app -- ~1630

With web app after login -- ~1632



Jetty 9

Without web app -- ~2107 classes

With web app -- ~8700 classes to begin with, and once i access the web application it increases to around ~ 9600 on first request, subsequent requests do not see a spike

Jetty 8 Without WebApp Jetty 8 Without WebApp

Jetty 8 With WebApp Jetty 8 With WebApp

Jetty 9 Without WebApp Jetty 9 Without WebApp

Jetty 9 With WebApp Jetty 9 With WebApp

Author:Sudarshan,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/22243174/huge-difference-in-number-classes-loaded-into-memory-by-jetty-8-and-jetty-9
yy