Closed Bug 230611 Opened 22 years ago Closed 18 years ago

nsCSSFrameConstructor::CharacterDataChanged has to call HasFirstLetterStyle

Categories

(Core :: Layout, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Unassigned)

References

Details

(Keywords: perf)

From a jprof profile of setting nodeValue a bunch of times on a textnode: 43087 18 651 nsCSSFrameConstructor::ContentChanged 422 nsCSSFrameConstructor::HaveFirstLetterStyle 80 nsTextFrame::ContentChanged 69 PresShell::GetPrimaryFrameFor 18 nsCSSFrameConstructor::GetFloatContainingBlock 12 nsCOMPtr_base::assign_from_helper So we're spending 2/3 of the total ContentChanged time seeing whether we maybe have a first-letter frame. This is about 10% of the total time it takes to set nodeValue. There's gotta be a better way to do this.
see attachment 138789 [details] from bug 230609 for the profiled code.
Keywords: perf
Note that this function has been renamed to CharacterDataChanged. Maybe we can have a bit on blockframes indicating they have first-letter style?
Summary: nsCSSFrameConstructor::ContentChanged has to call HasFirstLetterStyle → nsCSSFrameConstructor::CharacterDataChanged has to call HasFirstLetterStyle
Blocks: 367650
Fixed by checkin for bug 362901.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
No longer blocks: 367650
Depends on: 367650
Depends on: 362901
Flags: in-testsuite-
Product: Core → Core Graveyard
Component: Layout: Misc Code → Layout
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.