Investigate why emulated css flexbox is so much slower than xul flexbox on TART

NEW
Unassigned

Status

()

P3
normal
a year ago
6 months ago

People

(Reporter: bgrins, Unassigned)

Tracking

(Depends on: 1 bug, Blocks: 3 bugs)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

a year ago
Emulation mode is almost identical for ts_paint but is around 10x slower on tart (~22 vs ~2).

Tracking dashboards:
  tart - https://mzl.la/2Clo7R6
  ts_paint - https://mzl.la/2o1NnaL

Picking the latest push we have numbers for:

Without emulation:
- https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&revision=b906009d875d1f5d29b0d1252cdb43a9b1a5889c&selectedJob=170541764&group_state=expanded
- Subtests: https://treeherder.mozilla.org/perf.html#/comparesubtest?originalProject=mozilla-central&originalRevision=b906009d875d1f5d29b0d1252cdb43a9b1a5889c&newProject=mozilla-central&newRevision=b906009d875d1f5d29b0d1252cdb43a9b1a5889c&originalSignature=0beffdc8b6c1bc5bc0a0292a2947ad260d39e876&newSignature=0beffdc8b6c1bc5bc0a0292a2947ad260d39e876&framework=1
- Raw data: https://taskcluster-artifacts.net/Bx6kvv7TRYiMb9hNLvG__A/0/public/test_info/perfherder-data.json

With emulation: 
- https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&revision=b906009d875d1f5d29b0d1252cdb43a9b1a5889c&selectedJob=170541839&group_state=expanded
- Subtests: https://treeherder.mozilla.org/perf.html#/comparesubtest?originalProject=mozilla-central&originalRevision=b906009d875d1f5d29b0d1252cdb43a9b1a5889c&newProject=mozilla-central&newRevision=b906009d875d1f5d29b0d1252cdb43a9b1a5889c&originalSignature=664c274bfcf996b14aa7771b6f2779531c309868&newSignature=664c274bfcf996b14aa7771b6f2779531c309868&framework=1
- Raw data: https://taskcluster-artifacts.net/cdJuR1vHQlSHzuODhdEreQ/0/public/test_info/perfherder-data.json
(Reporter)

Comment 1

a year ago
Posted file tart-data.json
data from normal run
(Reporter)

Comment 2

a year ago
Posted file tart-flex-data.json
(Reporter)

Comment 3

a year ago
Xidorn mentioned that using attribute mapping for the [flex=N] selectors that we use in xul.css in emulation mode could be faster (https://bugzilla.mozilla.org/show_bug.cgi?id=1448555#c17). There may be some issues with that solution as per https://bugzilla.mozilla.org/show_bug.cgi?id=1448555#c19 but I'd be curious to see if it's having an effect.

The weird thing is that ts_paint is basically already parity so whatever perf cliff we are falling off of could definitely be something specific with the tab markup / css and not to do with these selectors.
It would be good if you have profile for the tests so that people can analyze what is causing the slowness. e.g. if selectors is a problem, we would expect seeing spending lots of time in selectors module for matching. But as far as there isn't tons of elements, that's generally shouldn't be a big problem.
(Reporter)

Comment 5

a year ago
Here are some profiles gathered locally via: `./mach talos-test --geckoProfile -a tart --setpref layout.css.emulate-moz-box-with-flex=true` and `./mach talos-test --geckoProfile -a tart`

TART with emulation:
https://perfht.ml/2J5ZxrE

TART normally:
https://perfht.ml/2J2rqku
Priority: -- → P3
(Reporter)

Updated

7 months ago
Blocks: 1304473
(Reporter)

Updated

7 months ago
Depends on: 1377253
(Reporter)

Updated

6 months ago
Depends on: 1493962
You need to log in before you can comment on or make changes to this bug.