New issue
Advanced search Search tips

Issue 768010 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Feature

Blocked on:
issue 785397



Sign in to add a comment

Some r_and_r.top_25 stories time out due to slow load.

Project Member Reported by simonhatch@chromium.org, Sep 22 2017

Issue description

rasterize_and_record_micro.top_25 failing on chromium.perf/Android One Perf

Builders failed on: 
- Android One Perf: 
  https://build.chromium.org/p/chromium.perf/builders/Android%20One%20Perf


Seems to always be on espn.html


Traceback (most recent call last):
  File "/b/swarming/w/ir/third_party/catapult/telemetry/telemetry/internal/story_runner.py", line 105, in _RunStoryAndProcessErrorIfNeeded
    state.RunStory(results)
  File "/b/swarming/w/ir/third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators.py", line 52, in traced_function
    return func(*args, **kwargs)
  File "/b/swarming/w/ir/third_party/catapult/telemetry/telemetry/page/shared_page_state.py", line 332, in RunStory
    self._current_page.Run(self)
  File "/b/swarming/w/ir/third_party/catapult/telemetry/telemetry/page/__init__.py", line 114, in Run
    shared_state.page_test.RunNavigateSteps(self, current_tab)
  File "/b/swarming/w/ir/third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators.py", line 52, in traced_function
    return func(*args, **kwargs)
  File "/b/swarming/w/ir/third_party/catapult/telemetry/telemetry/page/legacy_page_test.py", line 152, in RunNavigateSteps
    page.RunNavigateSteps(action_runner)
  File "/b/swarming/w/ir/third_party/catapult/telemetry/telemetry/page/__init__.py", line 123, in RunNavigateSteps
    url, script_to_evaluate_on_commit=self.script_to_evaluate_on_commit)
  File "/b/swarming/w/ir/third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators.py", line 52, in traced_function
    return func(*args, **kwargs)
  File "/b/swarming/w/ir/third_party/catapult/telemetry/telemetry/internal/actions/action_runner.py", line 187, in Navigate
    timeout_in_seconds=timeout_in_seconds))
  File "/b/swarming/w/ir/third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators.py", line 52, in traced_function
    return func(*args, **kwargs)
  File "/b/swarming/w/ir/third_party/catapult/telemetry/telemetry/internal/actions/action_runner.py", line 63, in _RunAction
    action.RunAction(self._tab)
  File "/b/swarming/w/ir/third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators.py", line 52, in traced_function
    return func(*args, **kwargs)
  File "/b/swarming/w/ir/third_party/catapult/telemetry/telemetry/internal/actions/navigate.py", line 27, in RunAction
    tab.WaitForDocumentReadyStateToBeInteractiveOrBetter(time_left_in_seconds)
  File "/b/swarming/w/ir/third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators.py", line 52, in traced_function
    return func(*args, **kwargs)
  File "/b/swarming/w/ir/third_party/catapult/telemetry/telemetry/internal/browser/web_contents.py", line 103, in WaitForDocumentReadyStateToBeInteractiveOrBetter
    'document.readyState == "complete"', timeout=timeout)
  File "/b/swarming/w/ir/third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators.py", line 52, in traced_function
    return func(*args, **kwargs)
  File "/b/swarming/w/ir/third_party/catapult/telemetry/telemetry/internal/browser/web_contents.py", line 239, in WaitForJavaScriptCondition
    return self._inspector_backend.WaitForJavaScriptCondition(*args, **kwargs)
  File "/b/swarming/w/ir/third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators.py", line 52, in traced_function
    return func(*args, **kwargs)
  File "/b/swarming/w/ir/third_party/catapult/telemetry/telemetry/internal/backends/chrome_inspector/inspector_backend.py", line 291, in WaitForJavaScriptCondition
    e.message + '\n' + debug_message)
TimeoutException: Timed out while waiting 59s for IsJavaScriptExpressionTrue.
Console output:
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/91ca257c5f5256601d600ad5f5834bee67abcde6

commit 91ca257c5f5256601d600ad5f5834bee67abcde6
Author: Simon <simonhatch@chromium.org>
Date: Fri Sep 22 22:35:33 2017

Disable espn on rasterize_and_record_micro.top_25

Bug: 768010
Change-Id: I441e7a5938ffa64332090732b4991a7c8c0c5717
Reviewed-on: https://chromium-review.googlesource.com/679268
Reviewed-by: Simon Hatch <simonhatch@chromium.org>
Reviewed-by: rnephew <rnephew@chromium.org>
Commit-Queue: Simon Hatch <simonhatch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503877}
[modify] https://crrev.com/91ca257c5f5256601d600ad5f5834bee67abcde6/tools/perf/benchmarks/rasterize_and_record_micro.py

Cc: -wkorman@chromium.org
Components: Tests>Telemetry Internals>Compositing>Rasterization
Labels: OS-Android
Owner: wkorman@chromium.org
Status: Assigned (was: Available)
We have a similar issue with timeout for Wikipedia. What I think is happening is that the html is huge due to incredibly verbose tag attributes.

chrishtr@ thinks that there's an optimize option we can turn on (may need to add a switch/flag) that will minimize the attributes and reduce html. This optimization is not on by default currently due to bugs, but they may be bugs that don't affect this page set.

Another solution may be to just increase the expected timeout for these tests. I didn't see a way to do this for a particular story, but I haven't had a chance to look thoroughly yet, and we could always add a way, or, we could do it for the whole benchmark.
 Issue 764543  is the Wikipedia issue.
Cc: pdr@chromium.org wkorman@chromium.org
 Issue 764543  has been merged into this issue.
Summary: Some r_and_r.top_25 stories time out due to slow load. (was: rasterize_and_record_micro.top_25 failing on chromium.perf/Android One Perf)
Cc: -wkorman@chromium.org nedngu...@google.com chrishtr@chromium.org
Labels: Pri-2 Type-Feature
On brief review snapping simple demo pages and looking for oddity, I see:

* perspective-origin and transform-origin on all elements
* id set on all elements even if not needed
* empty <style></style> tags
* explicit height present in style for all elements
* one-line style like 'border: 1px solid black' explodes into verbose
  border-<direction>-{style,width}. Many such attributes explode.
* style minimization has a fixed max iteration of 5, and could have
  bugs or low hanging opportunity for improvement

Possible solutions:

* look into why/if we need {perspective,transform}-origin
* only put id on elements when they've an associated style or need
* don't output <style> tag if there are no styles
* don't output an explicit height for elements unless needed
* run a re-collapse pass to turn verbose border-like styles into their
  more condensed equivalents
* explore alternate max iteration or algorithm tweaks

Most of the explosion seems to be the last bullet, re: minimization
not really minimizing as much as it could. Need to build more
complex baseline demo pages to explore further.

The verbose attribute explosion looks like next biggest impact.
We can extend the timeout, but that would increase the cycle time of the benchmark on bots. I think we should try to optimize the size/speed of static snapshot first before trying to extend timeout.
Project Member

Comment 8 by bugdroid1@chromium.org, Oct 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/catapult/+/ab715cde376e3c1d7b65afd91eb0479ad974be50

commit ab715cde376e3c1d7b65afd91eb0479ad974be50
Author: Nghia Nguyen <nednguyen@google.com>
Date: Tue Oct 03 20:41:50 2017

Move snap-it to catapult's top third_party project

This CL also update project's README to include contribution guideline & add OWNERS file.

Bug: chromium:768010
Change-Id: I06de6ad8e6d469788e84af35ac1a61c7b31115bd
Reviewed-on: https://chromium-review.googlesource.com/698807
Reviewed-by: Walter Korman <wkorman@chromium.org>
Commit-Queue: Ned Nguyen <nednguyen@google.com>

[add] https://crrev.com/ab715cde376e3c1d7b65afd91eb0479ad974be50/third_party/snap-it/README.md
[rename] https://crrev.com/ab715cde376e3c1d7b65afd91eb0479ad974be50/third_party/snap-it/tests/tests.html
[modify] https://crrev.com/ab715cde376e3c1d7b65afd91eb0479ad974be50/telemetry/telemetry/internal/snap_page_util.py
[rename] https://crrev.com/ab715cde376e3c1d7b65afd91eb0479ad974be50/third_party/snap-it/style.css
[rename] https://crrev.com/ab715cde376e3c1d7b65afd91eb0479ad974be50/third_party/snap-it/tests/tests.js
[rename] https://crrev.com/ab715cde376e3c1d7b65afd91eb0479ad974be50/third_party/snap-it/assets/camera.svg
[rename] https://crrev.com/ab715cde376e3c1d7b65afd91eb0479ad974be50/third_party/snap-it/assets/camera48.png
[rename] https://crrev.com/ab715cde376e3c1d7b65afd91eb0479ad974be50/third_party/snap-it/LICENSE
[rename] https://crrev.com/ab715cde376e3c1d7b65afd91eb0479ad974be50/third_party/snap-it/HTMLSerializer.js
[rename] https://crrev.com/ab715cde376e3c1d7b65afd91eb0479ad974be50/third_party/snap-it/popup.html
[add] https://crrev.com/ab715cde376e3c1d7b65afd91eb0479ad974be50/third_party/snap-it/OWNERS
[rename] https://crrev.com/ab715cde376e3c1d7b65afd91eb0479ad974be50/third_party/snap-it/content_script.js
[delete] https://crrev.com/c474937fb3f4a0af5dc2ddc2ed4491f7c7b1b543/telemetry/third_party/snap-it/README.md
[rename] https://crrev.com/ab715cde376e3c1d7b65afd91eb0479ad974be50/third_party/snap-it/assets/camera128.png
[rename] https://crrev.com/ab715cde376e3c1d7b65afd91eb0479ad974be50/third_party/snap-it/popup.js
[rename] https://crrev.com/ab715cde376e3c1d7b65afd91eb0479ad974be50/third_party/snap-it/manifest.json
[delete] https://crrev.com/c474937fb3f4a0af5dc2ddc2ed4491f7c7b1b543/telemetry/third_party/snap-it/README.chromium
[rename] https://crrev.com/ab715cde376e3c1d7b65afd91eb0479ad974be50/third_party/snap-it/assets/camera16.png

Project Member

Comment 9 by bugdroid1@chromium.org, Oct 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/catapult/+/8a0453f9d064d046ea74e47e2a76bdd96d20029d

commit 8a0453f9d064d046ea74e47e2a76bdd96d20029d
Author: Walter Korman <wkorman@chromium.org>
Date: Wed Oct 04 18:14:56 2017

Don't emit empty style tags.

We still emit an empty style tag with
id='${this.pseudoElementTestingStyleId}' in HTMLSerializer, but we
can look at that separately.

Bug: chromium:768010
Change-Id: If5c078ae68973b4c466d002c7a46fdc9e63f63cc
Reviewed-on: https://chromium-review.googlesource.com/696484
Reviewed-by: Ned Nguyen <nednguyen@google.com>
Commit-Queue: Walter Korman <wkorman@chromium.org>

[modify] https://crrev.com/8a0453f9d064d046ea74e47e2a76bdd96d20029d/third_party/snap-it/tests/tests.js
[modify] https://crrev.com/8a0453f9d064d046ea74e47e2a76bdd96d20029d/third_party/snap-it/HTMLSerializer.js
[modify] https://crrev.com/8a0453f9d064d046ea74e47e2a76bdd96d20029d/third_party/snap-it/popup.js

Two changes in CQ seem to dramatically shrink the size of the previously huge pages:

https://chromium-review.googlesource.com/c/chromium/src/+/755497
https://chromium-review.googlesource.com/c/chromium/src/+/755541

It's possible there's a bug in the external image support logic added where we used to embed images (which would make html huge) and now we treat them as external. However, cursory review does still show some inline embedded image:data.

Perhaps this is an improvement in any case as it would allow us to re-enable the disabled pages.
Blockedon: 785397
Aforementioned changes were reverted as the number of files caused benchmark cycle time to grow to an unacceptable level. nednguyen@ is looking at adding archive support to allow us to reland updated snapshots. This issue should therefore block on that.
Owner: vmp...@chromium.org
Transferring these to vmpstr@ as owner of the involved benchmark.

Note that the r_and_r benchmark is in consideration to be replaced (for perf regression monitoring purposes at least) by an updated repaint benchmark. More on that at issue 770800.
Components: Internals>GPU>Metrics
Components: Test>Telemetry
Components: -Tests>Telemetry

Sign in to add a comment