Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-2196

Reduce allocations from HttpString inn various places

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Minor Minor
    • 2.3.1.Final
    • None
    • Core, Servlet
    • None

      Hi,

      during profiling I found that some allocations are caused by `HttpString` that could be avoided.

      Most notably:

      • HttpTransferEncoding.persistentConnection
      • ServletInitialHandler.isMultipartExchange

      The former is a bit unfortunate as the method already uses an optimization for HTTP1/1 but not for HTTP1/0 (which unfortunately the command line tool `ab` is using.)

      I'll provide a PR shortly for these cases.

      Overall, these allocations make up for 2-3% of the benchmarks. Not huge, but noticeable and - most importantly - easy to avoid.

              flaviarnn Flavia Rainone
              christophdreis Christoph Dreis (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: