On Wed, Sep 14, 2011 at 7:27 PM, sebb <seb...@gmail.com> wrote: > On 14 September 2011 20:16, Ted Dunning <ted.dunn...@gmail.com> wrote: > > This is a red herring. No web server I know of restarts Java processes > like > > this. The JVM is kept hot and classes are not unloaded lightly. > > True, but the server does not normally load all the classes in all its > libraries, surely? >
No. But it is easy to code up some warmup in the startup part of the life cycle. That should be a penalty paid once when the server starts, not later on the first request. In the worst case, you can build a simple startup script that starts the server and then hits a few URL's to get the classes loaded. You can also do soft start with your load balancer. Seriously. This is a total red herring. > A one minute startup due purely to this one library would be an issue. I > > haven't heard that definitively demonstrated here at all. A > micro-benchmark > > would be useful. > > IIRC my tests showed something like 50ms for loading the FastMath > class with the previous version. > Yeah... there seems to be a bit of a discrepancy here that a bit of data would help with.