Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duckduckgo starts cpu racing and doesn't finish #7635

Closed
mdinger opened this issue Sep 15, 2015 · 17 comments
Closed

Duckduckgo starts cpu racing and doesn't finish #7635

mdinger opened this issue Sep 15, 2015 · 17 comments

Comments

@mdinger
Copy link

@mdinger mdinger commented Sep 15, 2015

Initial load kinda seems to work (doesn't look right though) but then resizing the window starts the CPU racing. It's been running for longer than 2 min so far with no progress.

./mach run https://duckduckgo.com/

[EDIT] Actually, it's not resizing that queues it. It just happens sometime after page load.

@mdinger
Copy link
Author

@mdinger mdinger commented Sep 15, 2015

If saved locally it loads quickly and resize works properly though the page doesn't look correct.

@jdm
Copy link
Member

@jdm jdm commented Sep 15, 2015

@mdinger is there any interesting output if you run with -p 4 (ie. dump profiler output every four seconds)?

@jdm jdm added the I-perf-bloat label Sep 15, 2015
@mdinger
Copy link
Author

@mdinger mdinger commented Sep 15, 2015

Sure. Let me know if you need more info. Killed it around 30 seconds in. You need a longer profile?

mdinger:servo$ ./mach run -p 4 https://duckduckgo.com/
_category_                          _incremental?_ _iframe?_             _url_                  _mean (ms)_   _median (ms)_      _min (ms)_      _max (ms)_       _events_ 
Compositing                             N/A          N/A                  N/A                        0.0003          0.0003          0.0003          0.0003               1

_category_                          _incremental?_ _iframe?_             _url_                  _mean (ms)_   _median (ms)_      _min (ms)_      _max (ms)_       _events_ 
Compositing                             N/A          N/A                  N/A                        4.9904          3.0694          0.0003         16.3032               6
Layout                                  no           no      https://duckduckgo.com/                 2.9877          2.9877          2.9877          2.9877               1
Layout                                  yes          no      https://duckduckgo.com/                14.1635         16.7587          0.5495         34.5576               6
+ Style Recalc                          no           no      https://duckduckgo.com/                 1.1637          1.1637          1.1637          1.1637               1
+ Style Recalc                          yes          no      https://duckduckgo.com/                12.8723         14.8286          0.9328         27.4230               5
+ Restyle Damage Propagation            no           no      https://duckduckgo.com/                 0.0005          0.0005          0.0005          0.0005               1
+ Restyle Damage Propagation            yes          no      https://duckduckgo.com/                 0.0056          0.0016          0.0004          0.0279               6
+ Generated Content Resolution          no           no      https://duckduckgo.com/                 0.1651          0.1651          0.1651          0.1651               1
+ Generated Content Resolution          yes          no      https://duckduckgo.com/                 0.0014          0.0016          0.0005          0.0020               6
+ Primary Layout Pass                   no           no      https://duckduckgo.com/                 0.6848          0.6848          0.6848          0.6848               1
+ Primary Layout Pass                   yes          no      https://duckduckgo.com/                 3.0188          1.0563          0.4745          8.7304               6
| + Parallel Warmup                     no           no      https://duckduckgo.com/                 0.0004          0.0004          0.0004          0.0004               1
| + Parallel Warmup                     yes          no      https://duckduckgo.com/                 0.0008          0.0007          0.0005          0.0012               6
+ Display List Construction             no           no      https://duckduckgo.com/                 0.0970          0.0970          0.0970          0.0970               1
+ Display List Construction             yes          no      https://duckduckgo.com/                 0.0854          0.0912          0.0026          0.2691               6
+ Painting Per Tile                     N/A          N/A                  N/A                        0.4759          0.0091          0.0020          8.0171              35
Painting                                N/A          N/A                  N/A                        6.3854          3.2436          0.0010         33.8878              12

_category_                          _incremental?_ _iframe?_             _url_                  _mean (ms)_   _median (ms)_      _min (ms)_      _max (ms)_       _events_ 
Compositing                             N/A          N/A                  N/A                        4.9083          3.0694          0.0003         16.3032               7
Layout                                  no           no      https://duckduckgo.com/                 2.9877          2.9877          2.9877          2.9877               1
Layout                                  yes          no      https://duckduckgo.com/                15.4291         16.7587          0.5495         34.5576               7
+ Style Recalc                          no           no      https://duckduckgo.com/                 1.1637          1.1637          1.1637          1.1637               1
+ Style Recalc                          yes          no      https://duckduckgo.com/                13.8299         18.6179          0.9328         27.4230               6
+ Restyle Damage Propagation            no           no      https://duckduckgo.com/                 0.0005          0.0005          0.0005          0.0005               1
+ Restyle Damage Propagation            yes          no      https://duckduckgo.com/                 0.0082          0.0016          0.0004          0.0279               7
+ Generated Content Resolution          no           no      https://duckduckgo.com/                 0.1651          0.1651          0.1651          0.1651               1
+ Generated Content Resolution          yes          no      https://duckduckgo.com/                 0.0014          0.0014          0.0005          0.0020               7
+ Primary Layout Pass                   no           no      https://duckduckgo.com/                 0.6848          0.6848          0.6848          0.6848               1
+ Primary Layout Pass                   yes          no      https://duckduckgo.com/                 3.0727          1.0563          0.4745          8.7304               7
| + Parallel Warmup                     no           no      https://duckduckgo.com/                 0.0004          0.0004          0.0004          0.0004               1
| + Parallel Warmup                     yes          no      https://duckduckgo.com/                 0.0008          0.0007          0.0005          0.0012               7
+ Display List Construction             no           no      https://duckduckgo.com/                 0.0970          0.0970          0.0970          0.0970               1
+ Display List Construction             yes          no      https://duckduckgo.com/                 0.1122          0.0912          0.0026          0.2731               7
+ Painting Per Tile                     N/A          N/A                  N/A                        0.5634          0.0091          0.0016          8.0171              52
Painting                                N/A          N/A                  N/A                        5.8773          1.6720          0.0010         33.8878              18

_category_                          _incremental?_ _iframe?_             _url_                  _mean (ms)_   _median (ms)_      _min (ms)_      _max (ms)_       _events_ 
Compositing                             N/A          N/A                  N/A                       22.6181         17.2437          0.0003         77.1425             119
Layout                                  no           no      https://duckduckgo.com/                 2.9877          2.9877          2.9877          2.9877               1
Layout                                  yes          no      https://duckduckgo.com/                 3.8987          1.9494          0.5495         34.5576              75
+ Style Recalc                          no           no      https://duckduckgo.com/                 1.1637          1.1637          1.1637          1.1637               1
+ Style Recalc                          yes          no      https://duckduckgo.com/                 1.0668          0.0918          0.0312         27.4230             124
+ Restyle Damage Propagation            no           no      https://duckduckgo.com/                 0.0005          0.0005          0.0005          0.0005               1
+ Restyle Damage Propagation            yes          no      https://duckduckgo.com/                 0.0125          0.0100          0.0004          0.2926             185
+ Generated Content Resolution          no           no      https://duckduckgo.com/                 0.1651          0.1651          0.1651          0.1651               1
+ Generated Content Resolution          yes          no      https://duckduckgo.com/                 0.0025          0.0023          0.0004          0.0076             185
+ Primary Layout Pass                   no           no      https://duckduckgo.com/                 0.6848          0.6848          0.6848          0.6848               1
+ Primary Layout Pass                   yes          no      https://duckduckgo.com/                 1.5366          1.2557          0.4745          8.7304             185
| + Parallel Warmup                     no           no      https://duckduckgo.com/                 0.0004          0.0004          0.0004          0.0004               1
| + Parallel Warmup                     yes          no      https://duckduckgo.com/                 0.0012          0.0011          0.0004          0.0056             185
+ Display List Construction             no           no      https://duckduckgo.com/                 0.0970          0.0970          0.0970          0.0970               1
+ Display List Construction             yes          no      https://duckduckgo.com/                 0.4302          0.4221          0.0026          1.2205             185
+ Painting Per Tile                     N/A          N/A                  N/A                        1.1436          0.0093          0.0009         16.2727            1155
Painting                                N/A          N/A                  N/A                        8.8560          2.1489          0.0010         52.6799             336

_category_                          _incremental?_ _iframe?_             _url_                  _mean (ms)_   _median (ms)_      _min (ms)_      _max (ms)_       _events_ 
Compositing                             N/A          N/A                  N/A                       21.5356         19.6501          0.0003         77.1425             221
Layout                                  no           no      https://duckduckgo.com/                 2.9877          2.9877          2.9877          2.9877               1
Layout                                  yes          no      https://duckduckgo.com/                 3.8804          1.9581          0.5495         34.5576              76
+ Style Recalc                          no           no      https://duckduckgo.com/                 1.1637          1.1637          1.1637          1.1637               1
+ Style Recalc                          yes          no      https://duckduckgo.com/                 0.6332          0.0935          0.0312         27.4230             227
+ Restyle Damage Propagation            no           no      https://duckduckgo.com/                 0.0005          0.0005          0.0005          0.0005               1
+ Restyle Damage Propagation            yes          no      https://duckduckgo.com/                 0.0116          0.0097          0.0004          0.2926             288
+ Generated Content Resolution          no           no      https://duckduckgo.com/                 0.1651          0.1651          0.1651          0.1651               1
+ Generated Content Resolution          yes          no      https://duckduckgo.com/                 0.0026          0.0025          0.0004          0.0076             288
+ Primary Layout Pass                   no           no      https://duckduckgo.com/                 0.6848          0.6848          0.6848          0.6848               1
+ Primary Layout Pass                   yes          no      https://duckduckgo.com/                 1.4767          1.2388          0.4745          8.7304             288
| + Parallel Warmup                     no           no      https://duckduckgo.com/                 0.0004          0.0004          0.0004          0.0004               1
| + Parallel Warmup                     yes          no      https://duckduckgo.com/                 0.0012          0.0012          0.0003          0.0056             288
+ Display List Construction             no           no      https://duckduckgo.com/                 0.0970          0.0970          0.0970          0.0970               1
+ Display List Construction             yes          no      https://duckduckgo.com/                 0.4395          0.4370          0.0026          1.2205             288
+ Painting Per Tile                     N/A          N/A                  N/A                        1.0864          0.0090          0.0008         16.2727            3497
Painting                                N/A          N/A                  N/A                        6.6741          1.4732          0.0010         52.6799             948

_category_                          _incremental?_ _iframe?_             _url_                  _mean (ms)_   _median (ms)_      _min (ms)_      _max (ms)_       _events_ 
Compositing                             N/A          N/A                  N/A                       20.9808         19.8415          0.0003         77.1425             319
Layout                                  no           no      https://duckduckgo.com/                 2.9877          2.9877          2.9877          2.9877               1
Layout                                  yes          no      https://duckduckgo.com/                 3.8804          1.9581          0.5495         34.5576              76
+ Style Recalc                          no           no      https://duckduckgo.com/                 1.1637          1.1637          1.1637          1.1637               1
+ Style Recalc                          yes          no      https://duckduckgo.com/                 0.4724          0.0936          0.0312         27.4230             325
+ Restyle Damage Propagation            no           no      https://duckduckgo.com/                 0.0005          0.0005          0.0005          0.0005               1
+ Restyle Damage Propagation            yes          no      https://duckduckgo.com/                 0.0112          0.0096          0.0004          0.2926             386
+ Generated Content Resolution          no           no      https://duckduckgo.com/                 0.1651          0.1651          0.1651          0.1651               1
+ Generated Content Resolution          yes          no      https://duckduckgo.com/                 0.0027          0.0025          0.0004          0.0444             386
+ Primary Layout Pass                   no           no      https://duckduckgo.com/                 0.6848          0.6848          0.6848          0.6848               1
+ Primary Layout Pass                   yes          no      https://duckduckgo.com/                 1.4686          1.2415          0.4745          8.7304             386
| + Parallel Warmup                     no           no      https://duckduckgo.com/                 0.0004          0.0004          0.0004          0.0004               1
| + Parallel Warmup                     yes          no      https://duckduckgo.com/                 0.0013          0.0012          0.0003          0.0056             386
+ Display List Construction             no           no      https://duckduckgo.com/                 0.0970          0.0970          0.0970          0.0970               1
+ Display List Construction             yes          no      https://duckduckgo.com/                 0.4568          0.4540          0.0026          1.4425             386
+ Painting Per Tile                     N/A          N/A                  N/A                        1.0684          0.0090          0.0007         16.2727            5752
Painting                                N/A          N/A                  N/A                        6.2551          1.3930          0.0010         52.6799            1536

_category_                          _incremental?_ _iframe?_             _url_                  _mean (ms)_   _median (ms)_      _min (ms)_      _max (ms)_       _events_ 
Compositing                             N/A          N/A                  N/A                       20.6633         19.8415          0.0003         77.1425             420
Layout                                  no           no      https://duckduckgo.com/                 2.9877          2.9877          2.9877          2.9877               1
Layout                                  yes          no      https://duckduckgo.com/                 3.8744          1.9581          0.5495         34.5576              77
+ Style Recalc                          no           no      https://duckduckgo.com/                 1.1637          1.1637          1.1637          1.1637               1
+ Style Recalc                          yes          no      https://duckduckgo.com/                 0.3847          0.0934          0.0312         27.4230             427
+ Restyle Damage Propagation            no           no      https://duckduckgo.com/                 0.0005          0.0005          0.0005          0.0005               1
+ Restyle Damage Propagation            yes          no      https://duckduckgo.com/                 0.0109          0.0095          0.0004          0.2926             488
+ Generated Content Resolution          no           no      https://duckduckgo.com/                 0.1651          0.1651          0.1651          0.1651               1
+ Generated Content Resolution          yes          no      https://duckduckgo.com/                 0.0027          0.0025          0.0004          0.0444             488
+ Primary Layout Pass                   no           no      https://duckduckgo.com/                 0.6848          0.6848          0.6848          0.6848               1
+ Primary Layout Pass                   yes          no      https://duckduckgo.com/                 1.4523          1.2472          0.4745          8.7304             488
| + Parallel Warmup                     no           no      https://duckduckgo.com/                 0.0004          0.0004          0.0004          0.0004               1
| + Parallel Warmup                     yes          no      https://duckduckgo.com/                 0.0013          0.0012          0.0003          0.0056             488
+ Display List Construction             no           no      https://duckduckgo.com/                 0.0970          0.0970          0.0970          0.0970               1
+ Display List Construction             yes          no      https://duckduckgo.com/                 0.4672          0.4576          0.0026          3.7454             488
+ Painting Per Tile                     N/A          N/A                  N/A                        1.0650          0.0089          0.0007         16.2727            8054
Painting                                N/A          N/A                  N/A                        6.0585          1.3578          0.0010         52.6799            2136

_category_                          _incremental?_ _iframe?_             _url_                  _mean (ms)_   _median (ms)_      _min (ms)_      _max (ms)_       _events_ 
Compositing                             N/A          N/A                  N/A                       20.4818         19.8281          0.0003         77.1425             517
Layout                                  no           no      https://duckduckgo.com/                 2.9877          2.9877          2.9877          2.9877               1
Layout                                  yes          no      https://duckduckgo.com/                 3.8618          1.9645          0.5495         34.5576              78
+ Style Recalc                          no           no      https://duckduckgo.com/                 1.1637          1.1637          1.1637          1.1637               1
+ Style Recalc                          yes          no      https://duckduckgo.com/                 0.3327          0.0933          0.0312         27.4230             525
+ Restyle Damage Propagation            no           no      https://duckduckgo.com/                 0.0005          0.0005          0.0005          0.0005               1
+ Restyle Damage Propagation            yes          no      https://duckduckgo.com/                 0.0107          0.0095          0.0004          0.2926             586
+ Generated Content Resolution          no           no      https://duckduckgo.com/                 0.1651          0.1651          0.1651          0.1651               1
+ Generated Content Resolution          yes          no      https://duckduckgo.com/                 0.0027          0.0025          0.0004          0.0444             586
+ Primary Layout Pass                   no           no      https://duckduckgo.com/                 0.6848          0.6848          0.6848          0.6848               1
+ Primary Layout Pass                   yes          no      https://duckduckgo.com/                 1.5206          1.2542          0.4745         36.9609             585
| + Parallel Warmup                     no           no      https://duckduckgo.com/                 0.0004          0.0004          0.0004          0.0004               1
| + Parallel Warmup                     yes          no      https://duckduckgo.com/                 0.0013          0.0012          0.0003          0.0056             586
+ Display List Construction             no           no      https://duckduckgo.com/                 0.0970          0.0970          0.0970          0.0970               1
+ Display List Construction             yes          no      https://duckduckgo.com/                 0.4700          0.4625          0.0026          3.7454             585
+ Painting Per Tile                     N/A          N/A                  N/A                        1.0645          0.0089          0.0006         18.5037           10267
Painting                                N/A          N/A                  N/A                        5.9822          1.3524          0.0010         52.6799            2714

^Cmach interrupted by signal or user action. Stopping.
mdinger:servo$ 

@jdm
Copy link
Member

@jdm jdm commented Sep 15, 2015

Interesting that there's zero profiling information from script. Sounds like that's our culprit for the CPU usage.

@mdinger
Copy link
Author

@mdinger mdinger commented Sep 15, 2015

Does that mean you need a more detailed profile from something like codeanalyst or that you have enough info here?

@jdm
Copy link
Member

@jdm jdm commented Sep 15, 2015

If you want to run Servo under something like perf or Instruments, that would be super useful.

@mdinger
Copy link
Author

@mdinger mdinger commented Sep 15, 2015

Eh, I'm not sure what you're after here but I got a flamegraph. My first try was with a release build which didn't have symbols. I tried a debug but I still think I'm missing symbols (this was a 10 min profile). Is there a specific process to set it up for servo? I'm not sure if it's a build issue or something else. Firefox always provided symbols via some server of something I think.

servo

@jdm
Copy link
Member

@jdm jdm commented Sep 15, 2015

Hmm, I don't really know what to make of that, especially the tower of [unknown]. I don't recall having problems seeing symbol names in debug builds in profilers before.

@mdinger
Copy link
Author

@mdinger mdinger commented Sep 15, 2015

@metajack Thanks. I'll give it a shot.

@mdinger
Copy link
Author

@mdinger mdinger commented Sep 15, 2015

Same result with release after what @metajack pointed out was uncommented. Actually, the last was from a debug build which I would think would have symbols too. I don't know how to fix this.

@mdinger mdinger changed the title Duckduckgo doesn't finish if resized Duckduckgo starts cpu racing and doesn't finish Sep 15, 2015
@jdm
Copy link
Member

@jdm jdm commented Sep 15, 2015

I ran this under Instruments' Time Profiler on OS X and found all of the activity appears to be under rendering code.

@jdm
Copy link
Member

@jdm jdm commented Sep 15, 2015

13% under WorkerThread::optimize_and_paint_tile, 5% under WorkerThread::create_draw_target_for_layer, 5% under rendergl::render_scene, 3% under StackingContext::optimize_and_draw_into_context, and there are a ton of threads that are doing these operations and taking up cpu time.

cc @mrobinson

@metajack
Copy link
Contributor

@metajack metajack commented Sep 15, 2015

@glennw and @pcwalton may be interested in this as well

@mdinger
Copy link
Author

@mdinger mdinger commented Sep 15, 2015

Thanks @jdm

@mdinger
Copy link
Author

@mdinger mdinger commented Oct 22, 2015

This no longer sets the CPU racing but it still doesn't look even close to correct with 12c6184 . It basically looks like a blank page though the sidebar sometimes appears.

@atouchet
Copy link
Contributor

@atouchet atouchet commented Jul 8, 2018

This is no longer an issue. The page now loads.

@atouchet atouchet closed this Jul 8, 2018
@paulrouget paulrouget mentioned this issue Jul 8, 2018
16 of 24 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.