https://bz.apache.org/bugzilla/show_bug.cgi?id=69419

John Engebretson <jeng...@amazon.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |---
             Status|RESOLVED                    |REOPENED

--- Comment #3 from John Engebretson <jeng...@amazon.com> ---
@markt this version of the patch loses much of the performance gain, thanks to
the repeated instanceof checks and typecasting:

while (wrappedRequest instanceof ApplicationHttpRequest) {
  wrappedRequest = ((ApplicationHttpRequest) wrappedRequest).getRequest();
}

The initial patch avoided this by performing both operations once (during the
constructor), and never doing them during the many calls to getAttribute().

My performance data, sorted from worst to best:

Before:
Depth 0: 970930633ns
Depth 1: 1175171009ns
Depth 4: 1950073374ns
Depth 7: 3441997543ns

Modified patch:
Depth 0: 968298514ns (-0.5%)
Depth 1: 1236370935ns (5%)
Depth 4: 1865582436ns (-4%)
Depth 7: 2525736664ns (-26%)

Original patch:
Depth 0: 970601794ns (0%)
Depth 1: 1210693988ns (2.5%)
Depth 4: 1420921877ns (-27%)
Depth 7: 1831309561ns (-47%)

Could we please update such that getAttribute() avoids the type checks?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to