[seam-issues] [JBoss JIRA] Moved: (JBSEAM-4732) Facelets Classloading Takes Much Longer when jsf-facelets.jar is Deployed in a Common Location

James Wilson (JIRA) jira-events at lists.jboss.org
Wed Nov 24 10:08:36 EST 2010


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

James Wilson moved JBAS-8583 to JBSEAM-4732:
--------------------------------------------

              Project: Seam  (was: JBoss Application Server)
                  Key: JBSEAM-4732  (was: JBAS-8583)
    Affects Version/s:     (was: JBossAS-5.0.0.GA)
             Security:     (was: Public)


> Facelets Classloading Takes Much Longer when jsf-facelets.jar is Deployed in a Common Location
> ----------------------------------------------------------------------------------------------
>
>                 Key: JBSEAM-4732
>                 URL: https://jira.jboss.org/browse/JBSEAM-4732
>             Project: Seam
>          Issue Type: Bug
>            Reporter: Gary Hu
>            Assignee: Ales Justin
>         Attachments: facelets-1.1.15.B1.patch
>
>
> 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.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list