[ 
https://jira.terracotta.org/jira//browse/CDV-265?page=comments#action_20965 ] 
            
Geert Bevin commented on CDV-265:
---------------------------------

I haven't read through all the code yet that instruments the classloader, but 
my initial thought immediately went to this: Sun's URL classloader maintains a 
cache for classes that are being read from jar files and such by implementing 
their custom sun.misc.URLClassPath class. If this isn't used and the bytes of 
all the classes are being read through URL.openStream(), jars are opened and 
searched through for each and every class, even if the jar had already been 
opened beforehand for another file. It looks like 
ClassProcessorHelper.getTCClass could be causing this.

I ran into exactly this for RIFE and implemented a way to still use this 
performance improvement with Sun VMs: 
https://svn.rifers.org/rife/trunk/src/framework/com/uwyn/rife/tools/ClassBytesLoader.java

We could look into adapting the same approach.

When measuring, this did increase startup performance of RIFE apps by 40% when 
running on Windows (Linux was a bit less dramatic IIRC).

> Perhaps some startup Performance improvement is needed.
> -------------------------------------------------------
>
>                 Key: CDV-265
>                 URL: https://jira.terracotta.org/jira//browse/CDV-265
>             Project: Community Development
>          Issue Type: Bug
>            Reporter: Sreenivasan Iyer
>         Assigned To: Issue Review Board
>         Attachments: slowTomcatStartup_tcconfig.xml
>
>
> See http://forums.terracotta.org/forums/posts/list/235.page
> See attached tc-config.xml.
> Startup degradation of 2x (50-100s) seems rather severe, given that it seems 
> that only 3 or 4 classes are being instrumented. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.terracotta.org/jira//secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev

Reply via email to