Originally posted by Peter Chase:
... and yet you don't want to pay for a proper real-time system? Ever heard of the term "false economy"?!
Originally posted by Ulf Dittmer:
Interesting indeed. But then you should probably also look into the effects of garbage collection, which may happen at some very inopportune moments, and delay everything in the order of seconds.
There's also a (within limits) real-time JVM from Sun, which I believe used to be a commercial offering, but whose technology is now folded back into the regular JVM. That would presumably have better -or at least more predictable- GC characteristics.
Originally posted by Jim Yingst:
I would try to write some good performance tests to measure response times under realistic conditions - or as close to realistic as you can get. Ideally, use a test environment which is a close copy of the production environment, including whatever enterprise server or framework(s) you plan to employ in production. For an application such as you describe, this will be useful for a lot more than just testing this particular optimization idea you have - you want some good, reliable numbers on any performance problems that may come up. Once you've got that, then try writing a simple warmUp() or preloadAllClasses() method to run as part of your engine's initialization, and see if it helps. Like most all performance optimizations, it's very easy to spend time and add complexity on things which don't really help you in the end (and may even harm you), so it's valuable to be able to measure what effects your changes are having.
Originally posted by Maneesh Godbole:
Scenario 1: Normal Case
main() is invoked and the JVM figures out the classes and dependencies if any and loads them accordingly
Scenario 2: Optimized case
There is a bunch of Class.forNames as the very first instruction set in main and then the code will proceed as Scenario 1.
Isnt the only difference the sequence between these two? Instead of loading the classes as and when required, all of them were loaded initially? Doesnt the time required to load these classes remain the same?
Wheres the advantage then? Unless of course you are talking about something totally different and I have misunderstood.