You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Tim McConnell (JIRA)" <ji...@apache.org> on 2009/01/06 21:37:44 UTC

[jira] Created: (GERONIMO-4497) Searching for resources in MultiParentClassLoader is not fully optimized

Searching for resources in MultiParentClassLoader is not fully optimized
------------------------------------------------------------------------

                 Key: GERONIMO-4497
                 URL: https://issues.apache.org/jira/browse/GERONIMO-4497
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: kernel
    Affects Versions: 2.1.4, 2.2
            Reporter: Tim McConnell
            Assignee: Tim McConnell
             Fix For: 2.1.4, 2.2


In one failing scenario, the BIRT reporting engine is invoked with an XML data file to generate a PDF report file. MultiParentClassLoader.getResource() is invoked many times to search for various XML resources (e.g., DocumentBuilderFactory). MultiParentClassLoader searches through the current classloader and all the parent classloaders, which it should, but this can take a considerable amount of time if the resource is never found. It seems that once a resource has been searched for and not found, there is no need to search for it again in the same classloader hierarchy. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (GERONIMO-4497) Searching for resources in MultiParentClassLoader is not fully optimized

Posted by "Tim McConnell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-4497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim McConnell resolved GERONIMO-4497.
-------------------------------------

    Resolution: Fixed

Changed MultiParentClassLoader to use a HashSet to maintain of list of those resources which have already been searched for, but not found, and thus preventing multiple searches for the same "not found" resources. This dramatically improves the performance when "not found" resources are searched for multiple times (e.g., by the BIRT reporting engine) especially when many parent classloaders are involved, and would otherwise have to be searched again. 

> Searching for resources in MultiParentClassLoader is not fully optimized
> ------------------------------------------------------------------------
>
>                 Key: GERONIMO-4497
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4497
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: kernel
>    Affects Versions: 2.1.4, 2.2
>            Reporter: Tim McConnell
>            Assignee: Tim McConnell
>             Fix For: 2.1.4, 2.2
>
>
> In one failing scenario, the BIRT reporting engine is invoked with an XML data file to generate a PDF report file. MultiParentClassLoader.getResource() is invoked many times to search for various XML resources (e.g., DocumentBuilderFactory). MultiParentClassLoader searches through the current classloader and all the parent classloaders, which it should, but this can take a considerable amount of time if the resource is never found. It seems that once a resource has been searched for and not found, there is no need to search for it again in the same classloader hierarchy. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-4497) Searching for resources in MultiParentClassLoader is not fully optimized

Posted by "Tim McConnell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661715#action_12661715 ] 

Tim McConnell commented on GERONIMO-4497:
-----------------------------------------

Hi Jeff, this change to MultiParentClassLoader improves the performance of Geronimo 2.1.4 for the BIRT reporting engine scenario to be almost identical to the performance in Geronimo 1.1.1 (where the xercesImpl.jar and xmlParserAPIs.jar files were located in the endorsed lib directory, and thus were immediately found). Could you download the latest Geronimo 2.1.4 snapshot and rerun your test without utilizing the endorsed lib directory ?? 

> Searching for resources in MultiParentClassLoader is not fully optimized
> ------------------------------------------------------------------------
>
>                 Key: GERONIMO-4497
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4497
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: kernel
>    Affects Versions: 2.1.4, 2.2
>            Reporter: Tim McConnell
>            Assignee: Tim McConnell
>             Fix For: 2.1.4, 2.2
>
>
> In one failing scenario, the BIRT reporting engine is invoked with an XML data file to generate a PDF report file. MultiParentClassLoader.getResource() is invoked many times to search for various XML resources (e.g., DocumentBuilderFactory). MultiParentClassLoader searches through the current classloader and all the parent classloaders, which it should, but this can take a considerable amount of time if the resource is never found. It seems that once a resource has been searched for and not found, there is no need to search for it again in the same classloader hierarchy. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-4497) Searching for resources in MultiParentClassLoader is not fully optimized

Posted by "Jeff Lu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661613#action_12661613 ] 

Jeff Lu commented on GERONIMO-4497:
-----------------------------------

By copying xercesImpl and xmlParserAPIs into the lib\endorsed directory, the performance is up to par as it is in Geronimo 1.1.1.  It almost would make sense to be able to copy the required jars into the application.ear\lib directory.

> Searching for resources in MultiParentClassLoader is not fully optimized
> ------------------------------------------------------------------------
>
>                 Key: GERONIMO-4497
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4497
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: kernel
>    Affects Versions: 2.1.4, 2.2
>            Reporter: Tim McConnell
>            Assignee: Tim McConnell
>             Fix For: 2.1.4, 2.2
>
>
> In one failing scenario, the BIRT reporting engine is invoked with an XML data file to generate a PDF report file. MultiParentClassLoader.getResource() is invoked many times to search for various XML resources (e.g., DocumentBuilderFactory). MultiParentClassLoader searches through the current classloader and all the parent classloaders, which it should, but this can take a considerable amount of time if the resource is never found. It seems that once a resource has been searched for and not found, there is no need to search for it again in the same classloader hierarchy. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-4497) Searching for resources in MultiParentClassLoader is not fully optimized

Posted by "Mike (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703193#action_12703193 ] 

Mike commented on GERONIMO-4497:
--------------------------------

I think this problem may still exist.  In the same environment (Geronimo 2.1.4 running an app that loads the BIRT report engine) we are seeing a report that should finish in 5 to 10 minutes take several hours.  While profiling the Geronimo process we have found that the majority of the time is spent in MultiParentClassLoader.loadClass().  Taking Geronimo out of the picture and running this report from the BIRT development environment (Eclipse w/ BIRT plugin) against the same database the report finishes in under 10 minutes.

Was this fixed confirmed?

> Searching for resources in MultiParentClassLoader is not fully optimized
> ------------------------------------------------------------------------
>
>                 Key: GERONIMO-4497
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4497
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: kernel
>    Affects Versions: 2.1.4, 2.2
>            Reporter: Tim McConnell
>            Assignee: Tim McConnell
>             Fix For: 2.1.4, 2.2
>
>
> In one failing scenario, the BIRT reporting engine is invoked with an XML data file to generate a PDF report file. MultiParentClassLoader.getResource() is invoked many times to search for various XML resources (e.g., DocumentBuilderFactory). MultiParentClassLoader searches through the current classloader and all the parent classloaders, which it should, but this can take a considerable amount of time if the resource is never found. It seems that once a resource has been searched for and not found, there is no need to search for it again in the same classloader hierarchy. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.