Closed
Bug 762345
Opened 12 years ago
Closed 12 years ago
Skip all the QIing stuff in the TreeMatchContext constructor if possible
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: bzbarsky, Assigned: ehsan.akhgari)
References
Details
(Keywords: perf, regression, Whiteboard: [qa-])
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
bzbarsky
:
review+
akeybl
:
approval-mozilla-aurora+
akeybl
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
This was added in bug 722853 and it's showing up in querySelector profiles.
Can we not skip all this stuff based on our visited handling value?
Assignee | ||
Comment 1•12 years ago
|
||
What's the exact semantics of mVisitedHandling?
Reporter | ||
Comment 2•12 years ago
|
||
That's the part I can't recall exactly....
But for the case of querySelector, the semantic is "treat all links as unvisited".
Assignee | ||
Comment 3•12 years ago
|
||
Does that only happen when we're in PB mode then? Or can it also be on as a result of a pref being set, etc.?
Reporter | ||
Comment 4•12 years ago
|
||
What do you mean?
The point is that querySelector(":visited") will always return null, no matter what's going on with PB mode. So there's no point checking for the PB mode stuff under querySelector, since it always treats all links as unvisited anyway, no matter what.
Assignee | ||
Updated•12 years ago
|
Assignee | ||
Comment 5•12 years ago
|
||
Like this?
Reporter | ||
Comment 6•12 years ago
|
||
Comment on attachment 631078 [details] [diff] [review]
Patch (v1)
The if check is backwards, no?
Attachment #631078 -
Flags: review?(bzbarsky) → review-
Assignee | ||
Comment 7•12 years ago
|
||
Indeed it is! :-)
Which makes me think, how should I test this patch? I ran the PB tests and the layout/style tests and everything seemed to be fine. I guess I'll push it to try.
Attachment #631078 -
Attachment is obsolete: true
Attachment #631087 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 8•12 years ago
|
||
Reporter | ||
Comment 9•12 years ago
|
||
Comment on attachment 631087 [details] [diff] [review]
Patch (v2)
r=me
Attachment #631087 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 10•12 years ago
|
||
Hmm, this patch is not correct, it fails a test that we have for exactly this reason:
https://tbpl.mozilla.org/php/getParsedLog.php?id=12462342&tree=Try
Is the TreeMatchContext used for things other than querySelector?
Reporter | ||
Comment 11•12 years ago
|
||
Yes, of course. It's used for all selector matching.
The real question is whether the eRelevantLinkUnvisited value is used elsewhere... and if so why ignoring private browsing there makes that elsewhere fail.
Assignee | ||
Comment 12•12 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #11)
> Yes, of course. It's used for all selector matching.
>
> The real question is whether the eRelevantLinkUnvisited value is used
> elsewhere... and if so why ignoring private browsing there makes that
> elsewhere fail.
Some of the TreeMatchContext's in nsStyleSet.cpp are constructed using eRelevantLinkUnvisited, which is why this happens, I think.
Given that, can we really avoid accessing the docshell here?
Reporter | ||
Comment 13•12 years ago
|
||
For the querySelector case, absolutely. We only need to touch the docshell to find out whether it's OK to tell the consumer about visitedness stuff, but querySelector doesn't expose that to start with...
Assignee | ||
Comment 14•12 years ago
|
||
So, is it find if I add a new argument to the TreeMatchContext's ctor which is set by the caller to ask for this check to be skipped?
Reporter | ||
Comment 15•12 years ago
|
||
It would be fine by my, esp, seeing as the constructor is inlined so the compiler could optimize this pretty well.
Assignee | ||
Comment 16•12 years ago
|
||
Attachment #631087 -
Attachment is obsolete: true
Attachment #631260 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 17•12 years ago
|
||
Reporter | ||
Comment 18•12 years ago
|
||
Comment on attachment 631260 [details] [diff] [review]
Patch (v3)
r=me
Attachment #631260 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 19•12 years ago
|
||
Target Milestone: --- → mozilla16
Assignee | ||
Comment 20•12 years ago
|
||
Comment on attachment 631260 [details] [diff] [review]
Patch (v3)
[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 722853
User impact if declined: perf regression
Testing completed (on m-c, etc.): locally and test suites being run
Risk to taking this patch (and alternatives if risky): minimal
String or UUID changes made by this patch: none
Attachment #631260 -
Flags: approval-mozilla-beta?
Attachment #631260 -
Flags: approval-mozilla-aurora?
Assignee | ||
Updated•12 years ago
|
status-firefox16:
--- → fixed
Comment 21•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 22•12 years ago
|
||
Comment on attachment 631260 [details] [diff] [review]
Patch (v3)
[Triage Comment]
Low risk perf fix for a FF14 regression. Approved for Aurora 15 and Beta 14.
Attachment #631260 -
Flags: approval-mozilla-beta?
Attachment #631260 -
Flags: approval-mozilla-beta+
Attachment #631260 -
Flags: approval-mozilla-aurora?
Attachment #631260 -
Flags: approval-mozilla-aurora+
Assignee | ||
Comment 23•12 years ago
|
||
http://hg.mozilla.org/releases/mozilla-aurora/rev/9421cb7212c3
http://hg.mozilla.org/releases/mozilla-beta/rev/3a950b9f6fdc
status-firefox14:
--- → fixed
status-firefox15:
--- → fixed
Updated•12 years ago
|
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•