Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3954

[perf] Use ResourceLoaderCache for ResourceHandler.libraryExists(...)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.2.8
    • JSR-344
    • None

    Description

      Thinking about some stuff for JSF 2.3 and checking how ResourceHandler is implemented, I notice the call to ResourceHandler.libraryExists(...) does not take advantage of ResourceLoaderCache and instead call every ResourceLoader and ContractResourceLoader. The problem is these loaders has some calls that are slow, while a cache lookup can be fast.

      Most of the time. ResourceHandler.libraryExists(...) is called when a facelet is compiled and it requires a composite components. Since there is already a cache for compiled facelets, the impact is seen only when the facelet is compiled, but this step is done for every facelet that makes a reference to the same composite component.

      It is a minor improvement, but it will improve the speed of the compilation step.

      Attachments

        Activity

          People

            lu4242 Leonardo Uribe
            lu4242 Leonardo Uribe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: