On Tue, 12 Aug 2003, hammett wrote: > ----- Original Message ----- > From: "Leo Sutic" <[EMAIL PROTECTED]> > > So your argument is: what's the deal if we load every single class at start > up hunting attributes? It'll be loaded otherwise, pal.
That's my argument, basically. > Sounds bad to me, but who am I to say anything? ;-) ? I thought you'd have somehting to say since you objected to the method based on performace reasons. Exactly where do we take the performance hit, and how big is it? Those are fairly basic questions that you haven't answered. I tested the following: Using the code I had, I loaded all classes in the Ant-1.5.1 jar. That's 401 classes. All tests were done with Jdk1.4.0 on a PIII 500MHz w. 384MB SDR RAM running Win2K. First, I loaded the classes. Then, in the same classloader, I loaded them again - this tells you how effective the caching is. (I.e. do we pay any penalty for loading classes that are already loaded?) First time (not cached): 1292 msec. Second time (cached) : 30 msec. So the cached performace is pretty much instantaneous. Since getting attributes for a class involves loading an attribute repository class and some fixup, say that loading a class + attributes for it takes three times the time it takes to just load a class. With a load rate of 400/1200 classes/msec, what would the performance hit be? Is that acceptable, given that it is only at startup? For a typical server (2x3GHz, GBs of DDR RAM) what is the performance, what is the cost, is it worth paying? /LS --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]