[Mono-dev] Reverted patch 55895

Miguel de Icaza miguel at novell.com
Sun Jan 22 14:28:55 EST 2006


Hello Konstantin,

   I reverted the patch 55895 because it has a severe performance
impact, and in Mono, it has a severe memory impact.   You inserted a
ToLower in a routine that is called numerous times on each request,
creating a problem for our runtime.

   I realize that you were trying to fix a bug, but given the delicate
nature of this routine, we must fix this bug in a different way.

   My suggestion is that you add at the end of the routine a call to
capitalize the string properly, so if we fail to find a match for a
string, say "content-lenght", it then capitalizes it properly and tries
the switch again (there is one special case to handle, header "TE", but
that is all).

   This means that the code in our libraries (the main consumer of it)
never hits the slow path, nor does it create unnecessary strings, and
user code that might use a different casing for those variables will
work as expected.

Miguel.



More information about the Mono-devel-list mailing list