classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Class loader optimization patch


From: Archie Cobbs
Subject: Re: Class loader optimization patch
Date: Mon, 3 Mar 2003 19:27:25 -0800 (PST)

Mark Wielaard wrote:
> > Or, maybe there's another motivation for this change that I missed?
> 
> It is mainly startup time that can be reduced somewhat. Big applications
> such as Eclipse create a new ClassLoader for every component (and stack

I kindof agree with Etienne but also love to optimize things too :-)

Here's another slant on this idea: if you don't care about the
stack trace, there's no reason an exception object can't be
reused. So the native code could just keep around a pre-allocated
exception object and throw it over and over again as necessary.
Since it's always caught, it will never "escape" into any code
that could try to print out its stack trace.

This might actually be faster than returning null, depending on
the relative speed of unwinding the stack via throwing an exception
versus unwinding the stack via successive returns.

-Archie

__________________________________________________________________________
Archie Cobbs     *     Precision I/O      *     http://www.precisionio.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]