[seam-issues] [JBoss JIRA] (JBSEAM-4732) Facelets Classloading Takes Much Longer when jsf-facelets.jar is Deployed in a Common Location
Ales Justin (Assigned) (JIRA)
jira-events at lists.jboss.org
Mon Nov 7 08:10:45 EST 2011
[ https://issues.jboss.org/browse/JBSEAM-4732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ales Justin reassigned JBSEAM-4732:
-----------------------------------
Assignee: Marek Novotny (was: Ales Justin)
Assigning it to Marek, to add a proper fix version - since afaik this was eventually resolved.
> Facelets Classloading Takes Much Longer when jsf-facelets.jar is Deployed in a Common Location
> ----------------------------------------------------------------------------------------------
>
> Key: JBSEAM-4732
> URL: https://issues.jboss.org/browse/JBSEAM-4732
> Project: Seam 2
> Issue Type: Bug
> Reporter: Gary Hu
> Assignee: Marek Novotny
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list