During some search for mailnews bottlenecks I happened to end up in GlyphHit in mozTXTToHTMLConv.cpp. I noticed that the recent optimization of GlyphHit broke the replacement of several patterns. For instance (r) -> ® That was because the previous output variable outputHTML was made a local variable and the value assigned to outputHTML never leaves the function. See: outputHTML = "©"; glyphTextLen = 3; MOZ_TIMER_STOP(mGlyphHitTimer); return PR_TRUE; Further more. I noticed that the initialization of the (now) local variable outputHTML consumes more than 50% of the time spent in GlyphHit and it's most often not used at all. I could open a seperate bug for that if it's wrong. By the way, how good is it to have a function that's called for every single character in a text? The overhead must be non-neglectable and I don't think any compiler would inline it.
Good catch. I broke this with my performance landing. I have a fix in my tree. Setting to m15.
Status: NEW → ASSIGNED
Target Milestone: M15
fix checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
*** Bug 32412 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.