Closed
Bug 1431421
Opened 6 years ago
Closed 6 years ago
stylo: Special-case GeckoElement::has_class to be less branchy.
Categories
(Core :: CSS Parsing and Computation, enhancement, P3)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla60
Tracking | Status | |
---|---|---|
firefox60 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
Details
Attachments
(2 files)
59 bytes,
text/x-review-board-request
|
xidorn
:
review+
|
Details |
5.22 KB,
patch
|
Details | Diff | Splinter Review |
See bug 1422522.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•6 years ago
|
||
This slightly improves the time, but it's still not great, seems like we really should get rid of the function call... I'll look into it.
Assignee | ||
Comment 3•6 years ago
|
||
This is on top of the patch above. Still does _not_ make us faster than Gecko on the test-case, on my local build. We could do this (with all the bindgen stuff to avoid hardcoding the symbol), though not ultra-enthusiastic about it. Also, it'd be nice if you profiled it in your machine. Times for gecko on my machine are: 1444 1405 1305 1279 1275 1258 1265 1293 1349 1274 For stylo, with these two patches: 1696 1557 1532 1474 1494 1514 1530 1554 1510 1495 Which is better than nightly, but still not faster. Gecko profile: https://perfht.ml/2DLGeSf Seems like most of the overhead is still in matches_complex_selector_internal... We may want to look into optimizations that the compiler doesn't end up doing or something.
Attachment #8943716 -
Flags: feedback?(xidorn+moz)
Updated•6 years ago
|
Priority: -- → P3
Comment 4•6 years ago
|
||
How much faster does the first patch alone give us? I'm not a fan of the second patch either, and it looks like inlining that doesn't make as much improvement as we wanted... Probably need some further investigation :/
Flags: needinfo?(emilio)
Comment 5•6 years ago
|
||
mozreview-review |
Comment on attachment 8943643 [details] Bug 1431421: Make GeckoElement::has_class more specialized. https://reviewboard.mozilla.org/r/214022/#review222242 Looks like a straightforward optimization we can take, although the function call overhead should still persist.
Attachment #8943643 -
Flags: review?(xidorn+moz) → review+
Comment 6•6 years ago
|
||
Comment on attachment 8943716 [details] [diff] [review] Hackety hackety hack. As I mentioned before, this indeed isn't great, and given that it doesn't fix all the problem, we should probably continue investigating before having it in...
Attachment #8943716 -
Flags: feedback?(xidorn+moz)
Pushed by ecoal95@gmail.com: https://hg.mozilla.org/integration/autoland/rev/2687ac50f577 Make GeckoElement::has_class more specialized. r=xidorn
Comment 8•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2687ac50f577
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Assignee | ||
Comment 9•6 years ago
|
||
Sorry I forgot to reply to this on time. (In reply to Xidorn Quan [:xidorn] UTC+10 from comment #4) > How much faster does the first patch alone give us? For reference, it gave us some. Enough to be noticeable. The second gave us much more of course, but it's gross.
Flags: needinfo?(emilio)
You need to log in
before you can comment on or make changes to this bug.
Description
•