Anchor tags should short circut for frame creation

RESOLVED WONTFIX

Status

()

RESOLVED WONTFIX
16 years ago
8 years ago

People

(Reporter: rods, Unassigned)

Tracking

Trunk
mozilla1.3beta
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
 
(Reporter)

Updated

16 years ago
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.1alpha
How do you plan to do this without breaking our support for the 'display'
property?  It seems that a much better solution to speeding up frame
construction would be to put the tag name callbacks in a hashtable and the
display type callbacks in an array.  (It would be nice to make the code more
extensible at some point as well.)

That said, I'm not convinced there's much benefit here (beyond the extensibility
advantages, except that we don't have much of an extensibility story anyway, so
why bother?).  When I moved text frames (of which we have lots more than
anchors) onto a separate frame construction path, it only saved about 10ms on
the page load tests (see bug 109788).  I'd be very surprised if you managed to
get more than a 2ms gain from this, and there are tons of other, much simpler,
things that you could do to get a 2ms gain (just look at a jprof profile to see
some of them).
Oh, this is the patch you sent by email, where what you do is make anchor tags
skip over ConstructHTMLFrame, etc?  That seems reasonable, although it does
break some of the -moz-* display types, which are (bizarrely, because hyatt was
told that all XUL code had to be firewalled) in ConstructXULFrame.  I'm somewhat
surprised at the perf win reported, although I guess it shouldn't surprise me
that much since I have seen ConstructHTMLFrame, etc., show up in profiles.

The namespace check is right now outside of ConstructSVGFrame but inside
ConstructMathMLFrame -- perhaps it would be better to move it outside
ConstructMathMLFrame and skip the isAnchor check for those two?  (I don't think
the isAnchor check is completely valid for ConstructXULFrame, as I said. 
ConstructXULFrame is reasonably efficient in this case, but not quite as
efficient as it should be.)
(Reporter)

Comment 3

16 years ago
Created attachment 91500 [details] [diff] [review]
patch

Patch to short circut for anchor tag and rearrange a few if for better
performance
(Reporter)

Updated

16 years ago
Target Milestone: mozilla1.1alpha → mozilla1.2beta
(Reporter)

Updated

16 years ago
Target Milestone: mozilla1.2beta → mozilla1.3beta
Assignee: rods → nobody
Status: ASSIGNED → NEW
QA Contact: sujay → printing
This is no longer relevant with the new frame constructor code.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.