Leo,
1. Your "Purpose" mail clearly specifies what this is all about, and I get
that point very well, and appreciate it. And we don't really need to
squibble... ;o)

2. I like to squibble.

Therefor,
You assume a few things too much, and walking all the classes is IMVHO a
bad idea (not taking into the account of the purpose of the exercise, but
in general terms of performing functionality in any code), and should be
avoided in a production environment.

First of all you assume that it is a server!  Haven't I seen Desktop apps
being built on top of Avalon?

Secondly, you assume that all servers are OK with a long start-up. I, for
instance, don't tolerate that my servers take 30s to get back up. It's
wasting my time.

Thirdly, you assume that all the jars only contains classes that are being
used. I beg to differ. As a stupid example, rt.jar, is far from loaded
when I create a small app. With proper SoII, I foresee a large amount of
implementation classes that are not loaded.

Fourthly, you assume that a couple of hundred classes is fine. Take a
concrete example, Cocoon, how many classes are in 50+ jar files?? I
haven't checked, but...  And I believe Cocoon is not the most extreme
case, especially since there are people (like me) who embedd the whole of
Cocoon as a subsystem into a larger application.


Cheers
Niclas


<quote who="Leo Sutic">
> 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]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to