I've determined that a significant portion of the processing time is spent 
satisfying java.io.File.getCanonicalFile() calls.  Most of these calls 
pass duplicate paths - i.e. paths that have been 'canonicalized' one or 
more times before, so I tried patching java.io.File.getCanonicalFile to 
use a Hashtable and noticed *very* signficant speedups. Unfortunately this 
patch is a cludge which works well for the way that Cocoon uses 
getCanonicalFile, but doesn't meet the specs of the method.

I then took a look through the Cocoon code and noticed that there are a 
lot of calls directly or indirectly to getCanonicalPath which are 
apparently unnecessary.  If getCanonicalPath is a 'costly' call, we should 
be avoiding using it unnecessarily.  It currently appears to be 
particularly costly on Mac OS X, but I have been informed that it is 
generally costly on all systems.

Some calls appear to be using getCanonicalPath() as a convenience for 
ensuring that a path string for a directory doesn't end with a file 
separator prior to appending one, rather than using for example:

        ( path.endsWith(File.separator) ? path : path + File.separator )

Some calls seem to be just calling it for the sake of standardizing the 
path format when such standardisation may not be necessary (e.g. for 
calling a java compiler).

Some calls appear to use getCanonicalPath where getAbsolutePath is all 
that is necessary.

The classloader code will need to use getCanonicalPath, but perhaps some 
hash table optimization would be appropriate here.

Any thoughts?

Stuart.


On Friday, June 29, 2001, at 09:14  am, Marcus Crafter wrote:

> n Thu, 28 Jun 2001, Donald Ball wrote:
>
>> On Thu, 28 Jun 2001, Stuart Roebuck wrote:
>>
>>> I think one of the big delays is the initialisation of multiple pool
>>> components?  Is lazy initialisation / loading a desirable and feasible
>>> option?
>>
>> _something_ to improve startup times would be nice.
>
>       I found using Jikes to compile the sitemap and xsp components helps
>       improve performance quite a bit, at least on our platforms (sparc and
>       intel linux).
>
>>> I'm running on Mac OS X which also has its performance quirks, so it may
>>> be more a platform issue than anything else, but I'm currently having to
>>> wait up to 10 minutes just to get things running.
>>
>> yow. i only have to wait 30-45 seconds to get everything cooking after
>> restarting tomcat.
>
>       ouch... ditto..
>
>       Cheers,
>
>       Marcus
>
> --
>         .....
>      ,,$$$$$$$$$,      Marcus Crafter
>     ;$'      '$$$$:    Computer Systems Engineer
>     $:         $$$$:   Open Software Associates GmbH
>      $       o_)$$$:   82-84 Mainzer Landstrasse
>      ;$,    _/\ &&:'   60327 Frankfurt Germany
>        '     /( &&&
>            \_&&&&'     Email : [EMAIL PROTECTED]
>           &&&&.        Business Hours : +49 69 9757 200
>     &&&&&&&:           After Hours    : +49 69 49086750
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>


-------------------------------------------------------------------------
Stuart Roebuck, BSc, MBA        Tel.: 0131 228 4853 / Fax.: 0870 054 8322
Managing Director
ADOLOS                                           <http://www.adolos.com/>

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

Reply via email to