[jboss-jira] [JBoss JIRA] Assigned: (JBAS-8583) facelets class loading takes much longer time after migrating from JBoss EAP 4.3 to 5.0

Ales Justin (JIRA) jira-events at lists.jboss.org
Fri Oct 29 16:48:55 EDT 2010


     [ https://jira.jboss.org/browse/JBAS-8583?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ales Justin reassigned JBAS-8583:
---------------------------------

    Assignee: Ales Justin


> facelets class loading takes much longer time after migrating from JBoss EAP 4.3 to 5.0
> ---------------------------------------------------------------------------------------
>
>                 Key: JBAS-8583
>                 URL: https://jira.jboss.org/browse/JBAS-8583
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: JBossAS-5.0.0.GA
>            Reporter: Gary Hu
>            Assignee: Ales Justin
>
> The facelets 1.1.15.B1 is placed under the $JBOSS_HOME/server/$PROFILE/lib folder. 
> In EAP 4.3, it takes about 2s to load the facelets library, but in EAP 5.0 it takes about 15s.
> The following facelets code is analyzed, which tells us the slowness comes from the facelets library loading:
>    
> public static URL[] search(ClassLoader cl, String prefix, String suffix) throws IOException {
>   Enumeration[] e = new Enumeration[] {
>     cl.getResources(prefix),
>     cl.getResources(prefix + "MANIFEST.MF")
>   };
>   Set all = new LinkedHashSet();
>   URL url;
>   URLConnection conn;
>   JarFile jarFile;
>   for (int i = 0, s = e.length; i < s; ++i) {
>     while (e[i].hasMoreElements()) {
>       url = (URL) e[i].nextElement();
>       conn = url.openConnection();
>       conn.setUseCaches(false);
>       conn.setDefaultUseCaches(false);
>       if (conn instanceof JarURLConnection) {
> 	jarFile = ((JarURLConnection) conn).getJarFile();
>       } else {
> 	jarFile = getAlternativeJarFile(url);
>       }
>       if (jarFile != null) {
> 	searchJar(cl, all, jarFile, prefix, suffix);
>       } else {
> 	boolean searchDone = searchDir(all, new File(URLDecoder.decode(url.getFile(), "UTF-8")), suffix);
>         if (!searchDone)
> 	{
> 	  searchFromURL(all, prefix, suffix, url);
> 	}
>       }
>     }
>   }
>   URL[] urlArray = (URL[]) all.toArray(new URL[all.size()]);
>   return urlArray;
> }
> This method is called from com.sun.facelets.compiler.TagLibraryConfig.loadImplicit() with the followign statement: 
>   ClassLoader cl = Thread.currentThread().getContextClassLoader();
>   URL[] urls = Classpath.search(cl, "META-INF/", SUFFIX); //SUFFIX is ".taglib.xml"

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

        


More information about the jboss-jira mailing list