myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (Commented) (JIRA)" <>
Subject [jira] [Commented] (MYFACES-3493) Cache info about non-existant resources in org.apache.myfaces.application.ResourceHandlerImpl.createResource()
Date Fri, 09 Mar 2012 16:48:57 GMT


Leonardo Uribe commented on MYFACES-3493:

This modification is questionable. In theory, the components will always register resources
that exists. Use the same cache used to save information related to Resource classes doesn't
sound good, because asking for non existent resources it is possible to clean that cache,
and that is not the idea. 

Instead, it is responsibility of the ResourceLoader implementation to minimize the associated
overhead. In this case, the cache should be implemented in org.apache.myfaces.shared.resource.ClassLoaderResourceLoader.

Anyway, it seems something more related to your particular environment, and not something
to solve from MyFaces side. I suggest to create a custom ResourceHandler implementation, reusing
the api provided by MyFaces into its shared package. 

Suggestions are welcome.
> Cache info about non-existant resources in org.apache.myfaces.application.ResourceHandlerImpl.createResource()
> --------------------------------------------------------------------------------------------------------------
>                 Key: MYFACES-3493
>                 URL:
>             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:!default.jspa
For more information on JIRA, see:


View raw message