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

Performance improvement in HtmlRenderKitImpl

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1.6
    • 1.2.7
    • None
    • None

    Description

      we did some profiling in our project and found out that HtmlRenderKitImpl creates some amount of transient object garbage when getRenderer is called:

      Self 8005 0,00 7,92 0 2894448
      J:org/apache/myfaces/renderkit/html/HtmlRenderKitImpl.getRenderer(Ljava/lang/String;Ljava/lang/String;)Ljavax/faces/render/Renderer;
      Child 24015 0,00 4,69 0 1714064
      J:java/lang/StringBuffer.append(Ljava/lang/String;)Ljava/lang/StringBuffer;

      The above values were recorded with just 2 request to a page with many components - 2.8MB of transient objects were created by 8005 calls to getRenderer.
      I assume that this is due to the "keying" currenlty implemented which always creates a concatinated string. I guess using a Map<String, Map<String, Renderer>> doubleMap could improve the performance here since string creation for keying would not be nessary.

      Might also touch 1.2 and 2.0.

      Attachments

        1. MYFACES-2156.patch
          5 kB
          Leonardo Uribe

        Activity

          People

            lu4242 Leonardo Uribe
            pschoepf Philipp Schoepf
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: