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

[perf] Use lazy init for HashMap/HastSet where possible

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.0.13, 2.1.7
    • None
    • None

    Description

      goal: make component tree creation fast as possible and avoid unnecessary instances

      some components instantialize attributes direct in field or in constructor. In many cases it is not necessary, because those HashMap/Set instances are not used in current request/response - it depends on use case.

      Example: UIViewRoot.listenerSuccessMap: lazy init is very suitable, because many view have no phase listener.

      Check all components: candidates are "smarter" components like UIDate or UIInput

      Attachments

        1. UIViewRoot.patch
          3 kB
          Martin Kočí
        2. RequestViewContext.patch
          1 kB
          Martin Kočí
        3. _ComponentAttributesMap.patch
          0.9 kB
          Martin Kočí
        4. FaceletCompositionContextImpl.patch
          6 kB
          Martin Kočí
        5. TemplateContextImpl.patch
          1 kB
          Martin Kočí

        Activity

          People

            markoc50 Martin Kočí
            markoc50 Martin Kočí
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: