GlyphHit broken / won't replace (r) ® with and (c) with ©

RESOLVED FIXED in M15

Status

MailNews Core
MIME
P3
minor
RESOLVED FIXED
18 years ago
10 years ago

People

(Reporter: Daniel Bratell, Assigned: Scott MacGregor)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

18 years ago
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.
(Assignee)

Comment 1

18 years ago
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
(Assignee)

Comment 2

18 years ago
fix checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 3

18 years ago
*** Bug 32412 has been marked as a duplicate of this bug. ***
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.