tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 49613] Request.getAttributeNames() slows down some applications
Date Mon, 19 Jul 2010 12:18:56 GMT

--- Comment #5 from Sampo Savolainen <> 2010-07-19 08:18:52 EDT ---
Can you abbreviate on how I did not understand the code correctly? 

This is how I understood it:

'getAttributes(Globals.CERTIFICATES_ATTR)' is called when a secure connection
is made. This call is made to make sure the 'if( isSSLAttribute(name) )' branch
is activated. This branch then fills out the attributes Map with the SSL

The only change I did was to use an object variable (sslAttributesRead) to make
sure the 'if( isSSLAttribute(name) )' branch is executed only once per request.

So this fixes the assumption the current code has, which is that once the SSL
attributes are read, the 'getAttributes(Globals.CERTIFICATES_ATTR)' call
terminates as it finds a value for the attribute.

I don't see a problem with my logic. Can you explain what I got wrong?

Re: disturbing...

You are very correct that this is a bit disturbing. But given the complexity
and generic nature of web application frameworks, such use is inevitable. And,
the performance hit the application takes is unacceptable (response time of 40
seconds instead of 4 in one case) especially since this is easily solvable.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message