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.)
Created attachment 91500 [details] [diff] [review] patch Patch to short circut for anchor tag and rearrange a few if for better performance
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.