MyFaces Trinidad
  1. MyFaces Trinidad
  2. TRINIDAD-1675

performance: StyleSheetDocument is called 10 times on initial render, consider caching.

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.12-core
    • Fix Version/s: None
    • Component/s: Skinning
    • Labels:
      None

      Description

      Look into caching the style sheet per StyleContext in StyleSheetDocument's
      public Iterator<StyleSheetNode> getStyleSheets(StyleContext context)
      because this calls _getStyleSheets which does a lot of comparing work.

        Activity

        Hide
        Jeanne Waldman added a comment -

        This time I see _getStyleSheets get called 5 times on initial render with CHECK_FILE_MODIFICATION turned off. The object it returns isn't held on to, so it's not so much a memory issue as it is a speed issue.
        1. FileSystemStyleCache (FSSC) -> _getEntry -> _getStyleSheetDocument -> getNamepspacePrefixes -> StyleSheetDocument's (SSD) getStyleSheet

        2. FSSC -> _getEntry -> _getCompatibleEntry -> _getDerivationKey -> SSD's getStyleSheets

        3. FSSC -> _getEntry -> _createEntry -> _getStyleContextResolvedStyloe -> getStyles -> _getStyleSheets

        4. NameUtils -> getContextName ->getStyleSheets

        5. NameUtils -> getContextName -> getDocumentId -> getStyleSheets

        Show
        Jeanne Waldman added a comment - This time I see _getStyleSheets get called 5 times on initial render with CHECK_FILE_MODIFICATION turned off. The object it returns isn't held on to, so it's not so much a memory issue as it is a speed issue. 1. FileSystemStyleCache (FSSC) -> _getEntry -> _getStyleSheetDocument -> getNamepspacePrefixes -> StyleSheetDocument's (SSD) getStyleSheet 2. FSSC -> _getEntry -> _getCompatibleEntry -> _getDerivationKey -> SSD's getStyleSheets 3. FSSC -> _getEntry -> _createEntry -> _getStyleContextResolvedStyloe -> getStyles -> _getStyleSheets 4. NameUtils -> getContextName ->getStyleSheets 5. NameUtils -> getContextName -> getDocumentId -> getStyleSheets

          People

          • Assignee:
            Unassigned
            Reporter:
            Jeanne Waldman
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development