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

[PERF] enhance scanning for #{cc} expressions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.3
    • JSR-314
    • None

    Description

      Reported by Martin Koci

      MK>> a issue to consider in
      MK>> org.apache.myfaces.view.facelets.tag.TagAttributeImpl:

      MK>> Methods
      MK>> TagAttributeImpl.getMethodExpression and
      MK>> TagAttributeImpl.getValueExpression use
      MK>> CompositeComponentELUtils.isCompositeComponentXYZ methods to detect if
      MK>> current #{} contains cc expression. But consider following: if user
      MK>> migrates from facelets 1.2 to 2.0, this new cc detection slows down
      MK>> build view process. In one my test case VDL.buildView calls
      MK>> CompositeComponentELUtils.isCompositeComponentXYZ approx 3000 times per
      MK>> build view with no match. isCompositeComponentXYZ is not cheap method
      MK>> because it uses Pattern.matches().

      MK>> Are there possibilities to avoid this? For example is possible have some
      MK>> kind of "isProcessingCompositeComponent" method and skip
      MK>> Pattern.matches() if false? We are in VDL.buildView here and no
      MK>> components are available yet, no use of methods like
      MK>> UIComponent.isCompositeComponent(UIComponent) is possible.

      See discussion on dev list:

      [core] performance: TagAttributeImpl and composite component EL detection

      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: