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

[perf] Add FaceletCompositionContext.incrementUniqueComponentId() and prevent create ids when is not necessary

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.14, 2.1.8
    • Component/s: None
    • Labels:
      None

      Description

      There are some cases, when part or the whole component tree is refreshed, in which it is not necessary to calculate the generated component id. Instead, it is possible to reorganize the code a little bit and add FaceletCompositionContext.incrementUniqueComponentId() to cause the same effect without generate the instance. An increment in a counter will be always faster than any check in the cache or any unnecessary String generation.

      Remember there is a static table for generated component ids, so the effect is minimal in typical cases, but anyway I think it is worth to do it because in dynamic parts, the static table is not used.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: