myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitry Kukushkin (Commented) (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Commented] (MYFACES-3493) Cache info about non-existant resources in org.apache.myfaces.application.ResourceHandlerImpl.createResource()
Date Mon, 12 Mar 2012 17:19:38 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-3493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227703#comment-13227703
] 

Dmitry Kukushkin commented on MYFACES-3493:
-------------------------------------------

In fact there is a use case:
During the xhtml compilation, tags from the document are processed through the chain of known
namespaces, to find out if there is a handler for this tag implemented in this tag library.
This goes OK, until a tag library, declaring composite-tag-library name is met (in our case
this is Tomahawk).
Then MyFaces, is trying to load a resource with the name like /resources/<composite-tag-library>/<tag>.xhtml
For every tag, which wasn't handled, this operation will be performed (including also lookups
on the file system and in jars).
Simply for every standard html tag like <a>, <br>, <div> etc this operation
will be failing every time (for us it was a factor of 25 in the response time increase).

I was initially thinking of submitting this issue to the Tomahawk's jira,
But then I thought that it's better to implement this caching in the MyFases itself, to avoid
such a performance issues, should some tag library, implementing composite tags, have similar
implementation issues.
                
> Cache info about non-existant resources in org.apache.myfaces.application.ResourceHandlerImpl.createResource()
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3493
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3493
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: Extension Feature
>    Affects Versions: 2.1.6
>         Environment: Linux FC15
>            Reporter: Dmitry Kukushkin
>
> The existent resources are cached in the public Resource createResource(String resourceName,
String libraryName, String contentType) method,
> which is good, but the information about resources, which are not existent ( deriveResourceMeta(loader,
resourceName, libraryName, localePrefix) returned null ) is not cached.
> Thus at the next requests for the same resource the same resource lookup operations will
happen, which may be expensive.
> In my case, for example (Tomcat + Spring + MyFaces + Tomahawk), for every html tag, lookup
on the file system and in all classpaths (including ~30 jars) is performed (and failing),
which de-gradates response time by factor of 25!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message