New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 644921 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Verify if CFI made any impact on the style change perf

Project Member Reported by krasin@chromium.org, Sep 7 2016

Issue description

Per Elliott suggestion, the following (currently manual) test case should be done:

1. Open https://en.wikipedia.org/wiki/Cat
2. Open DevTools console (with the Elements panel *not* open)
3. Run the following:

var t = performance.now();
document.body.style.display = "none";
document.body.offsetTop;
document.body.style.display = "";
document.body.offsetTop; performance.now() - t;

It will display a number that is expected to be about the same for CFI and non-CFI (if no regression happened).
 
Also try getComputedStyle(document.body).color which does just style instead of layout which offsetTop causes.
Status: Fixed (was: Untriaged)
For #1 I used the following snippet:

var t = performance.now();
document.body.style.display = "none";
getComputedStyle(document.body).color
document.body.style.display = "";
getComputedStyle(document.body).color;
performance.now() - t;

The numbers are in the spreadsheet:
https://docs.google.com/spreadsheets/d/1KSJILMx7OXufaFMXgXenaLKGZnMj2jnwWvBOStjFg3g/edit?usp=sharing

For #0, the numbers a consistent (mean values):

non-LTO, non-CFI: 222.3
LTO, non-CFI:     199.1
LTO, CFI:         216.0

There's some CFI-related slowdown, but it's smaller than what we gain from LTO. The overhead will become even smaller, when the upcoming optimizations are implemented. While there're some methods I could find and disable CFI for, I don't think it makes sense to do.

For #1 the numbers don't make any sense to me. Probably, a hint that this is a noisy benchmark (means):

non-LTO, non-CFI: 73.998
LTO, non-CFI:     74.965
LTO, CFI:         70.867

Here, we see that LTO makes things slower, but then CFI speeds them up. That is unlikely to be truth, and I would rather say, these numbers are equal modulo noise.

Sign in to add a comment