Uploaded image for project: 'Beehive'
  1. Beehive
  2. BEEHIVE-1093

Add URLTemplateFactory and TemplatedURLFormatter to the request to reduce synchronized bottleneck in ServletContext.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0, 1.0.1
    • 1.0.2
    • NetUI
    • None

    Description

      Some containers such as tomcat, implement the ServletContext getAttribute method with synchronization on the attribute object or the attributes map. In beehive NetUI, the URL template factory and the formatter used for rewriting are cached as attributes on the ServletContext. This would be a bottleneck under a large load for an app with pages that require lots of URL rewriting (I.E. lots of NetUI anchor tags, etc.). For each href or URL that needs to be written in a single user request, the URL rewriting gets the ServletContext attributes for the template factory and formatter.

      To improve performance, the URL template factory and formatter could be set as attributes to the request. Then, the URL rewriting could get the template factory and formatter from the individual request and minimize the conflict with multiple user requests and the synchronization at the ServletContext attributes. Note, we still need to cache these objects globally as attributes on the context but at the start of processing a page flow request, the objects could be pulled from the context and added to the request.

      Attachments

        Activity

          People

            jzhuo Julie Zhuo
            crogers Howard Carlin Rogers
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: