Closed Bug 1425058 Opened 6 years ago Closed 6 years ago

stylo: Profile StyleBench.

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla60
Performance Impact high
Tracking Status
firefox60 --- fixed

People

(Reporter: emilio, Assigned: hiro)

References

(Depends on 1 open bug)

Details

(Whiteboard: [QRC_Analyzed])

Attachments

(2 files)

$ cd third_party/webkit/PerformanceTests
$ python -m SimpleHTTPServer 8001
$ firefox http://localhost:8001/StyleBench/
Just a quick update; The StyleBench has four categories, I did get profiles for the categories respectively with STYLO_THREADS=1.  I will get more profiles for each sub test one by one.

* Descendant and child combinators
 https://perfht.ml/2ACZuDe
* Sibling combinators
 https://perfht.ml/2ACoA5q
* Positional pseudo classes
 https://perfht.ml/2AAxjox
* Before and after pseudo elements
 https://perfht.ml/2ABMRZ3-
Setting ni? to me, I've almost forgotten this.
Flags: needinfo?(hikezoe)
Priority: -- → P1
Summary: Profile StyleBench. → stylo: Profile StyleBench.
I've started looking the bench.  Each categories have four sub tests;

1) Adding classes
2) Removing classes
3) Adding leaf elements
4) Removing leaf elements

The test runs these four sub tests 5 times repeatedly in this sequence.  I think we might need to modify it to run each sub test only one time.  Also the last 'Removing leaf elements' test is too fast to get profile (I am using 0.1ms which is the shortest value).  So I will not take the profile for 4) case.
Depends on: 1428949
Here is profile results other than 'Removing leaf elements'.  0.1ms interval and 900MB buffer size used in the profiler.  I did modify the bench mark two points (I will attach the modification later);

1) Separated a DOM tree creation for testing from the first test run
   The bench mark originally created the DOM tree when the first test (Adding classes) runs.
2) Increased number of elements to be modified to 500
   The bench mark originally modified 100 different elements in each test

- Descendant and child combinators
    Adding classes        : https://perf-html.io/public/074f575e78856c1b28c13a881911377ae8bbcae0/calltree/?hiddenThreads=&range=1.1822_1.2031&thread=2&threadOrder=0-2-1&v=2
    Removing classes      : https://perf-html.io/public/ed27a9e0ac4f49c50c301ce19eb728d30fe9a3ad/calltree/?hiddenThreads=&range=1.2303_1.2657&thread=4&threadOrder=0-2-3-4-1&v=2
    Adding leaf elements  : https://perf-html.io/public/69f23ca3b9f470ed5a35f4b4185cd8ac32f7b79a/calltree/?hiddenThreads=&range=1.3008_1.3133&thread=3&threadOrder=0-2-3-4-5-1&v=2
- Sibling combinators
    Adding classes        : https://perf-html.io/public/9f5cb2f13549a3ff84bc85a1975a311f0d70a14c/calltree/?hiddenThreads=&range=1.1481_1.1804&thread=3&threadOrder=0-2-3-1&v=2
    Removing classes      : https://perf-html.io/public/e37b33f395852b582511bb34e736be07e300161b/calltree/?hiddenThreads=&range=1.4250_1.4856&thread=4&threadOrder=0-2-3-4-5-1&v=2
    Adding leaf elements  : https://perf-html.io/public/e1580f4c1a8e7fc45f8093f98e41e5e1ae228d92/calltree/?hiddenThreads=&range=1.3114_1.4549&thread=3&threadOrder=0-2-3-4-5-1&v=2
- Positional pseudo classes
    Adding classes        : https://perf-html.io/public/871aa264d154fba3914304fecac68d6ec48fca0e/calltree/?hiddenThreads=&range=1.1663_1.1882&thread=3&threadOrder=0-2-3-1&v=2
    Removing classes      : https://perf-html.io/public/0261bdcf5426fe68f417b075e868c4c459ea48a8/calltree/?hiddenThreads=&range=1.2665_1.3101&thread=3&threadOrder=0-2-3-4-5-1&v=2
    Adding leaf elements  : https://perf-html.io/public/ba249aedab833d751d1fa81a038b45b3da7e5718/calltree/?hiddenThreads=&range=1.8674_2.0132&thread=5&threadOrder=0-2-3-4-5-1&v=2
- Before and after pseudo elements
    Adding classes        : https://perf-html.io/public/a4e766bd0169df57fc23923b16f734c8f4b37cdf/calltree/?hiddenThreads=&range=1.0692_1.0958&thread=2&threadOrder=0-2-3-1&v=2
    Removing classes      : https://perf-html.io/public/d9214b161af964a3b939588e264c07fb9f7a5f8e/calltree/?hiddenThreads=&range=1.1657_1.2121&thread=5&threadOrder=0-2-3-4-5-1&v=2
    Adding leaf elements  : https://perf-html.io/public/2b103fcfce4bc746d4d6e7bba59d7ef0146f968f/calltree/?hiddenThreads=&range=1.2683_1.2793&thread=5&threadOrder=0-2-3-4-5-1&v=2

Note that 'Adding leaf elements' uses querySelectorAll('*').  The 'Adding leaf elements' tests both in 'Sibling combinators' and 'Positional pseudo classes' took bit longer than another two tests.   It might be worth checking.
Flags: needinfo?(hikezoe)
This is the modifications.
Assigning to Hiro because he is investigating StyleBench.
Assignee: nobody → hikezoe
Priority: P1 → P3
there is a case on a try push where it appears everything regressed but stylebench improved:
https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&newProject=try&newRevision=cd0d24d4447b42c9bf013d3b65940dfad746246f&framework=1&filter=speed&selectedTimeRange=172800

not sure if:
* stylebench is higher numbers == better
* stylebench needs some configuration options
* stylebench measures something else than all our other tests (i.e. speedometer, dromaeo, kraken, pageload, etc.)

:emilio- do you have any thoughts on this?  I am happy to try options or change how it is run if we need to update the test.
Flags: needinfo?(emilio)
(In reply to Joel Maher ( :jmaher) (UTC-5) from comment #7)
> there is a case on a try push where it appears everything regressed but
> stylebench improved:
> https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-
> central&newProject=try&newRevision=cd0d24d4447b42c9bf013d3b65940dfad746246f&f
> ramework=1&filter=speed&selectedTimeRange=172800
> 
> not sure if:
> * stylebench is higher numbers == better

Should be, yeah.

> * stylebench needs some configuration options

Not that I know of.

> * stylebench measures something else than all our other tests (i.e.
> speedometer, dromaeo, kraken, pageload, etc.)

Yes. In particular, StyleBench right now measures a bunch of rust code, and that change seems to only affect C++ code. Still the improvement is surprising. I'll do some try runs tomorrow with patches that would definitely hurt StyleBench, and see what's going on. Thanks for the heads up!
Just to cycle back here, I didn't forget about this, I just messed up the talos try syntax and I just realized about it, so will need to push again. Sorry for the lag.
Yup, the metrics on talos are effectively reversed:

  https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&newProject=try&newRevision=8ee625c8ff11b73573836f0558cb88cd45b562a6&framework=1&selectedTimeRange=172800

Joel, I plan to update stylebench to trunk, since it's got quite a few cleanups, how can I ensure that I fix this while at it?
Flags: needinfo?(emilio) → needinfo?(jmaher)
ok, we need to figure out the results and aggregation on stylebench- I suspect I failed to do this properly when setting it up.  Since StyleBench reported results on the first try, I didn't look in detail.  Let me look a bit more
Flags: needinfo?(jmaher)
stylebench has 4 major tests and each test has 12 subtests/variations.  From what I can tell in the code for stylebench, the results of the tests are summarized just like speedometer- this looks right as each test is a sum(subtests) and that is true for both speedometer and stylebench.

here is some data for stylebench:
https://treeherder.mozilla.org/perf.html#/comparesubtest?originalProject=try&originalRevision=604787652920&newProject=try&newRevision=c0e452fc1d7c760e0e0623f072f170df871f304b&originalSignature=fe5860f7d48636c0694a754e0bf7ace5fc91d02f&newSignature=fe5860f7d48636c0694a754e0bf7ace5fc91d02f&framework=1

Given this, we can pull out the 4 test values and use the same calculation as speedometer.

:rwood, can you review the talos changes
:emilio, can you review the logic assumptions I outlined here.
Attachment #8947959 - Flags: review?(rwood)
Attachment #8947959 - Flags: review?(emilio)
Comment on attachment 8947959 [details] [diff] [review]
summarize stylebench scores properly

Review of attachment 8947959 [details] [diff] [review]:
-----------------------------------------------------------------

Looks fine, thanks for looking into this!

If you want to double-check it catches regressions you can use https://hg.mozilla.org/try/rev/c91554b4d8101abd8919b38de2931cb65c5b3542 or something of the sort.

::: testing/talos/talos/output.py
@@ +269,5 @@
> +            raise Exception("StyleBench has 52 subtests, found: %s instead" % len(results))
> +
> +        results = results[12::13]
> +        score = 60 * 1000 / filter.geometric_mean(results) / correctionFactor
> +        return score

Yeah, it makes sense to use the same metric as speedometer, since it uses the same harness.
Attachment #8947959 - Flags: review?(emilio) → review+
Comment on attachment 8947959 [details] [diff] [review]
summarize stylebench scores properly

Review of attachment 8947959 [details] [diff] [review]:
-----------------------------------------------------------------

R+ with the one fix noted

::: testing/talos/talos/output.py
@@ +265,5 @@
> +        # stylebench has 4 tests, each of these are made of up 12 subtests
> +        # and a sum of the 12 values.  We receive 62 values, and want to use
> +        # the 4 test values, not the sub test values.
> +        if len(results) != 52:
> +            raise Exception("StyleBench has 52 subtests, found: %s instead" % len(results))

Is it 52 or 62? The comment online 266 says "we receive 62" values
Attachment #8947959 - Flags: review?(rwood) → review+
Pushed by jmaher@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7cae84b12528
summarize stylebench scores properly. r=rwood,emilio
https://hg.mozilla.org/mozilla-central/rev/7cae84b12528
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
This updated our stylebench baselines:

== Change summary for alert #11409 (as of Tue, 06 Feb 2018 14:23:43 GMT) ==

Improvements:

667%  stylebench linux64 pgo e10s     8.91 -> 68.31
542%  stylebench linux64 opt e10s     9.54 -> 61.21
191%  stylebench windows10-64 pgo e10s13.89 -> 40.41
173%  stylebench windows7-32 pgo e10s 14.25 -> 38.96
100%  stylebench osx-10-10 opt e10s   16.36 -> 32.75
100%  stylebench windows10-64 opt e10s16.56 -> 33.15
 38%  stylebench windows7-32 opt e10s 19.61 -> 26.96

For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=11409
Hiro, do you have time to record new profiles of StyleBench running in a recent Firefox Nightly build? The profiles in comment 4 are two months old.
Flags: needinfo?(hikezoe)
Reopening this bug because this because was inadvertently closed when some StyleBench Talos changes landed (in comment 17). We still need to analyze StyleBench profiles for any obvious performance problems we can fix.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I will take them today.
New results on this revision: https://hg.mozilla.org/mozilla-central/rev/580d833df9c4 with the same conditions in comment 4 (with attachment 8940952 [details] and STYLO_THREADS=1).

- Descendant and child combinators
  Adding classes:         https://perfht.ml/2FBrFBC
  Removing classes:       https://perfht.ml/2EYp2sK
  Adding leaf elements:   https://perfht.ml/2EXPe6R
  Removing leaf elements: https://perfht.ml/2EZQl5M
- Sibling combinators
  Adding classes:         https://perfht.ml/2EXUNCi
  Removing classes:       https://perfht.ml/2F0dW6E
  Adding leaf elements:   https://perfht.ml/2EZsmDV
  Removing leaf elements: https://perfht.ml/2EXPRxf
- Positional pseudo classes
  Adding classes:         https://perfht.ml/2EYCFIc
  Removing classes:       https://perfht.ml/2EZPrGq
  Adding leaf elements:   https://perfht.ml/2EYbMnU
  Removing leaf elements: https://perfht.ml/2EXQGGl
- Before and after pseudo elements
  Adding classes:         https://perfht.ml/2EVNrz3
  Removing classes:       https://perfht.ml/2EXRlrj
  Adding leaf elements:   https://perfht.ml/2EWPlzo
  Removing leaf elements: https://perfht.ml/2EVNKdb
Flags: needinfo?(hikezoe)
Thanks, Hiro! Jean Gong offered to ask the Quantum Flow team's profile-analyzing experts to take a look at these profiles for any obvious hot spots.
Whiteboard: [qf][QRC_NeedAnalysis]
Before we assign someone look at these profiles: do we have any idea of which of comment 22's steps we're slower than other browsers on?  (i.e. do we have comparisons to other browsers for these submeasurements?)

That would help narrow down which of comment 22's profiles we should focus on in particular.
Flags: needinfo?(hikezoe)
Last time I run the bench on chrome, we were generally faster than chrome even with STYLO_THREADS=1. (of course we are definitely faster with more threads. :) )  I don't recall whether all tests were faster or not.  I will check it later.
Stylo with privacy.reduceTimerPrecision=false and STYLO_THREADS=1 (revision: https://hg.mozilla.org/mozilla-central/rev/190b536928f8)

Descendant and child combinators : Adding classes : Sync: 5.9399999999996 ms
Descendant and child combinators : Adding classes : Async: 23.279999999999745 ms
Descendant and child combinators : Removing classes : Sync: 10.260000000000218 ms
Descendant and child combinators : Removing classes : Async: 28.460000000000036 ms
Descendant and child combinators : Adding leaf elements : Sync: 10.860000000000582 ms
Descendant and child combinators : Adding leaf elements : Async: 29.340000000000146 ms
Descendant and child combinators : Removing leaf elements : Sync: 4.5 ms
Descendant and child combinators : Removing leaf elements : Async: 23.18000000000029 ms
Descendant and child combinators : 136.34000000000106 ms
Sibling combinators : Adding classes : Sync: 7.400000000000546 ms
Sibling combinators : Adding classes : Async: 19.600000000000364 ms
Sibling combinators : Removing classes : Sync: 9.460000000000036 ms
Sibling combinators : Removing classes : Async: 37.64000000000033 ms
Sibling combinators : Adding leaf elements : Sync: 10.61999999999989 ms
Sibling combinators : Adding leaf elements : Async: 131.5 ms
Sibling combinators : Removing leaf elements : Sync: 4.019999999999527 ms
Sibling combinators : Removing leaf elements : Async: 129.64000000000033 ms
Sibling combinators : 350.4800000000005 ms
Positional pseudo classes : Adding classes : Sync: 9.480000000000473 ms
Positional pseudo classes : Adding classes : Async: 21.94000000000051 ms
Positional pseudo classes : Removing classes : Sync: 9.039999999999964 ms
Positional pseudo classes : Removing classes : Async: 25.579999999999927 ms
Positional pseudo classes : Adding leaf elements : Sync: 10.680000000000291 ms
Positional pseudo classes : Adding leaf elements : Async: 125.42000000000007 ms
Positional pseudo classes : Removing leaf elements : Sync: 2.9200000000000728 ms
Positional pseudo classes : Removing leaf elements : Async: 120.69999999999982 ms
Positional pseudo classes : 326.6999999999998 ms
Before and after pseudo elements : Adding classes : Sync: 6.720000000000255 ms
Before and after pseudo elements : Adding classes : Async: 19.399999999999636 ms
Before and after pseudo elements : Removing classes : Sync: 9.039999999999964 ms
Before and after pseudo elements : Removing classes : Async: 31.660000000000764 ms
Before and after pseudo elements : Adding leaf elements : Sync: 10.579999999999927 ms
Before and after pseudo elements : Adding leaf elements : Async: 39.340000000000146 ms
Before and after pseudo elements : Removing leaf elements : Sync: 3.5200000000004366 ms
Before and after pseudo elements : Removing leaf elements : Async: 24.719999999999345 ms
Before and after pseudo elements : 145.84000000000106 ms
Arithmetic Mean : 239.8400000000006 ms
Geometric Mean : 218.43794390396226 ms
Total : 959.3600000000024 ms
Score : 91.55918446473355 rpm

Chromium (revision: https://chromium.googlesource.com/chromium/src/+/a8768c2cd0aea923b6ee86077e3b608518b44e2d)

Descendant and child combinators : Adding classes : Sync: 4.399999999805004 ms
Descendant and child combinators : Adding classes : Async: 31.300000000555883 ms
Descendant and child combinators : Removing classes : Sync: 6.999999999607098 ms
Descendant and child combinators : Removing classes : Async: 48.40000000058353 ms
Descendant and child combinators : Adding leaf elements : Sync: 11.099999999714782 ms
Descendant and child combinators : Adding leaf elements : Async: 34.59999999995489 ms
Descendant and child combinators : Removing leaf elements : Sync: 2.7000000000043656 ms
Descendant and child combinators : Removing leaf elements : Async: 39.00000000066939 ms
Descendant and child combinators : 179.90000000099826 ms
Sibling combinators : Adding classes : Sync: 4.500000000007276 ms
Sibling combinators : Adding classes : Async: 86.4000000001397 ms
Sibling combinators : Removing classes : Sync: 22.099999999227293 ms
Sibling combinators : Removing classes : Async: 97.30000000035943 ms
Sibling combinators : Adding leaf elements : Sync: 8.799999999610009 ms
Sibling combinators : Adding leaf elements : Async: 131.3000000000102 ms
Sibling combinators : Removing leaf elements : Sync: 4.500000000007276 ms
Sibling combinators : Removing leaf elements : Async: 139.99999999941792 ms
Sibling combinators : 496.19999999868014 ms
Positional pseudo classes : Adding classes : Sync: 4.399999999805004 ms
Positional pseudo classes : Adding classes : Async: 35.200000000259024 ms
Positional pseudo classes : Removing classes : Sync: 6.499999999505235 ms
Positional pseudo classes : Removing classes : Async: 50.900000000183354 ms
Positional pseudo classes : Adding leaf elements : Sync: 7.700000000113505 ms
Positional pseudo classes : Adding leaf elements : Async: 99.50000000026193 ms
Positional pseudo classes : Removing leaf elements : Sync: 3.499999999803549 ms
Positional pseudo classes : Removing leaf elements : Async: 95.5999999996493 ms
Positional pseudo classes : 305.8000000000902 ms
Before and after pseudo elements : Adding classes : Sync: 4.299999999602733 ms
Before and after pseudo elements : Adding classes : Async: 53.60000000018772 ms
Before and after pseudo elements : Removing classes : Sync: 7.700000000113505 ms
Before and after pseudo elements : Removing classes : Async: 69.90000000041618 ms
Before and after pseudo elements : Adding leaf elements : Sync: 7.100000000718865 ms
Before and after pseudo elements : Adding leaf elements : Async: 54.29999999978463 ms
Before and after pseudo elements : Removing leaf elements : Sync: 2.7999999992971425 ms
Before and after pseudo elements : Removing leaf elements : Async: 35.499999999956344 ms
Before and after pseudo elements : 236.49999999997817 ms
Arithmetic Mean : 304.5999999999367 ms
Geometric Mean : 283.4582733575084 ms
Total : 1218.3999999997468 ms
Score : 70.55712208750822 rpm

It seems that "Positional pseudo classes" is bit slower than chromium.
Both use attachment 8940952 [details].

Daniel, if it would be nice to get the profile results on old style system too, I will get them. :)
Flags: needinfo?(hikezoe) → needinfo?(dholbert)
Depends on: 1443066
(In reply to Hiroyuki Ikezoe (:hiro) from comment #26)
> It seems that "Positional pseudo classes" is bit slower than chromium.

Thanks! I spun off bug 1443066 to cover the biggest-duration pieces of that group of tests.

On the whole, though, it looks like we're doing quite well on this benchmark! (significantly higher "score" & lower total time)

> Daniel, if it would be nice to get the profile results on old style system
> too, I will get them. :)

That might be interesting for comparison, particularly for the tests where you noticed we're behind Chrome by a decently-sized duration -- it might be useful to know if those are cases where we used to be doing better and have regressed.

If it's a lot of work to get those measurements, though, I'm not sure it's a huge deal -- I wouldn't say that's as important as comparing our current style system vs. the main competition (which you did comment 26).
Flags: needinfo?(dholbert)
Here is a result on old style system.  As you can see, basically stylo is faster then this, but some "Adding leaf elements" and "Removing leaf elements" is slower than this old style system.  It may be related to querySelectorAll().  Anyway I will take profiles for the test cases.

Descendant and child combinators : Adding classes : Sync: 12.740000000000236 ms
Descendant and child combinators : Adding classes : Async: 35.57999999999993 ms
Descendant and child combinators : Removing classes : Sync: 14.320000000000164 ms
Descendant and child combinators : Removing classes : Async: 45.45999999999913 ms
Descendant and child combinators : Adding leaf elements : Sync: 9.280000000000655 ms
Descendant and child combinators : Adding leaf elements : Async: 31.960000000000036 ms
Descendant and child combinators : Removing leaf elements : Sync: 3.219999999999345 ms
Descendant and child combinators : Removing leaf elements : Async: 22.24000000000069 ms
Descendant and child combinators : 175.48000000000002 ms
Sibling combinators : Adding classes : Sync: 12.299999999999272 ms
Sibling combinators : Adding classes : Async: 170.04000000000087 ms
Sibling combinators : Removing classes : Sync: 15.539999999999964 ms
Sibling combinators : Removing classes : Async: 172.89999999999964 ms
Sibling combinators : Adding leaf elements : Sync: 11.38000000000011 ms
Sibling combinators : Adding leaf elements : Async: 121.65999999999985 ms
Sibling combinators : Removing leaf elements : Sync: 4.140000000000327 ms
Sibling combinators : Removing leaf elements : Async: 161.0599999999995 ms
Sibling combinators : 670.0199999999995 ms
Positional pseudo classes : Adding classes : Sync: 11.240000000000691 ms
Positional pseudo classes : Adding classes : Async: 23.639999999999418 ms
Positional pseudo classes : Removing classes : Sync: 14.639999999999418 ms
Positional pseudo classes : Removing classes : Async: 40.279999999999745 ms
Positional pseudo classes : Adding leaf elements : Sync: 10.420000000000073 ms
Positional pseudo classes : Adding leaf elements : Async: 117.57999999999993 ms
Positional pseudo classes : Removing leaf elements : Sync: 3.4600000000000364 ms
Positional pseudo classes : Removing leaf elements : Async: 107.76000000000022 ms
Positional pseudo classes : 330.0600000000004 ms
Before and after pseudo elements : Adding classes : Sync: 9.239999999999782 ms
Before and after pseudo elements : Adding classes : Async: 52.159999999999854 ms
Before and after pseudo elements : Removing classes : Sync: 12.579999999999927 ms
Before and after pseudo elements : Removing classes : Async: 72.44000000000051 ms
Before and after pseudo elements : Adding leaf elements : Sync: 9.899999999999636 ms
Before and after pseudo elements : Adding leaf elements : Async: 39.039999999999964 ms
Before and after pseudo elements : Removing leaf elements : Sync: 3.4200000000000728 ms
Before and after pseudo elements : Removing leaf elements : Async: 24.199999999999818 ms
Before and after pseudo elements : 227.23999999999978 ms
Arithmetic Mean : 350.69999999999993 ms
Geometric Mean : 306.44198513958435 ms
Total : 1402.7999999999997 ms
Score : 65.26520832610453 rpm
Flags: needinfo?(hikezoe)
Here is the results on old style system (the same revision in comment 26).

- Descendant and child combinators
  Adding classes:         https://perfht.ml/2oQCZlp
  Removing classes:       https://perfht.ml/2oPyesl
  Adding leaf elements:   https://perfht.ml/2oOzT1q
  Removing leaf elements: https://perfht.ml/2oRJjJx
   perf.html can't be handled this link (due to too short duration?).
   you have to find 'removeLeafElements' symbol from this link https://perfht.ml/2oRL3T5 instead.
- Sibling combinators
  Adding classes:         https://perfht.ml/2oQkZaS
  Removing classes:       https://perfht.ml/2oS0SZV
  Adding leaf elements:   https://perfht.ml/2oNZNSW
  Removing leaf elements: https://perfht.ml/2oQoVZl
- Positional pseudo classes
  Adding classes:         https://perfht.ml/2oNZZSa
  Removing classes:       https://perfht.ml/2oP0prF
  Adding leaf elements:   https://perfht.ml/2oPowGx
  Removing leaf elements: https://perfht.ml/2oOANuQ
- Before and after pseudo elements
  Adding classes:         https://perfht.ml/2oPUsL6
  Removing classes:       https://perfht.ml/2oPUxhS
  Adding leaf elements:   https://perfht.ml/2oOAX5q
  Removing leaf elements: https://perfht.ml/2oRKk4
Flags: needinfo?(hikezoe)
(In reply to Hiroyuki Ikezoe (:hiro) from comment #29)
>   Removing leaf elements: https://perfht.ml/2oRKk4

Paste error.  Here is the correct link;
The link had lost somewhere. :)  https://perfht.ml/2oRKk4j
Whiteboard: [qf][QRC_NeedAnalysis] → [qf:p1][QRC_Analyzed]
Emilio, if you are ever looking for something to do, we have some Gecko profiles to be analyzed in comment 29 where Stylo is slower than Gecko's old style system on StyleBench's "Adding leaf elements" and "Removing leaf elements" test cases.
Flags: needinfo?(emilio)
Where are them? Happy to take a look in my spare time.
Flags: needinfo?(emilio) → needinfo?(cpeterson)
(In reply to Emilio Cobos Álvarez [:emilio] from comment #33)
> Where are them? Happy to take a look in my spare time.

The profiles that Hiro recorded are linked from comment 29.
Flags: needinfo?(cpeterson)
I meant... Are they all the "Adding / removing leaf elements"? Only the pseudo-elements ones? Positional pseudo classes?

Mind filing a bug for whichever of them are different?
Flags: needinfo?(cpeterson)
s/different/slower
(In reply to Emilio Cobos Álvarez [:emilio] from comment #35)
> I meant... Are they all the "Adding / removing leaf elements"? Only the
> pseudo-elements ones? Positional pseudo classes?

Raw numbers are in first half of comment 26 (stylo) vs. comment 28 (gecko).

At first glance, the only cases where Stylo is more than 1-2ms slower than Gecko's old style system are:
Positional pseudo classes : Removing leaf elements : Async
 120.69 ms with stylo, 107.76 ms with gecko

Sibling combinators : Adding leaf elements : Async:
 131.5 ms with stylo, 121.65 with gecko.

(not sure what the variability of the results is, though -- and I think in some benchmarks, "Async" means "wait one rAF frame i.e. refresh driver tick", which can introduce some semi-unrelated noise... not sure if that's the case here.)
Err, sorry Daniel, should've looked closer. As a (bad) excuse, I was on my phone :).

I think that should mostly be tracked by bug 1443066, it's the same optimization.
Flags: needinfo?(cpeterson)
Sorry for the confusion!

Can we close this "Profile StyleBench" bug now? Hiro has recorded the StyleBench profiles and we have bug 1443066 about the slow test case.
Yeah, that sounds fine. Thanks Hiro for taking time for profiling this!
Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
Performance Impact: --- → P1
Whiteboard: [qf:p1][QRC_Analyzed] → [QRC_Analyzed]
You need to log in before you can comment on or make changes to this bug.