Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Audit DOM APIs that do layout reflows #10027

Closed
bbondy opened this issue Jul 17, 2017 · 6 comments
Closed

Audit DOM APIs that do layout reflows #10027

bbondy opened this issue Jul 17, 2017 · 6 comments
Labels
addressed-with-brave-core Needs confirmation, but this issue may be resolved with Brave Core. perf project-tracking wontfix

Comments

@bbondy
Copy link
Member

bbondy commented Jul 17, 2017

We should audit the usage of any DOM api on this list and at least limit the usage.
For example in APP_WINDOW_UPDATED we could do everything once and cache it.
https://gist.github.com/paulirish/5d52fb081b3570c81e3a

@bbondy bbondy added this to the 0.20.x (Developer Channel) milestone Jul 17, 2017
@jonathansampson
Copy link
Collaborator

Related: https://csstriggers.com/

@cezaraugusto
Copy link
Contributor

cezaraugusto commented Jul 18, 2017

screen shot 2017-07-18 at 3 15 20 am

@diracdeltas
Copy link
Member

these are used all over the place in the Brave content scripts

@cezaraugusto
Copy link
Contributor

I'll make use of this as a tracking issue there's a lot of room for improvement.

@cezaraugusto
Copy link
Contributor

cezaraugusto commented Aug 4, 2017

  • Stick with compositor layers whenever needed

    • for tab previews - done, see c07be24
    • for new tab's first paint gotten slow after property addition [wontfix]
    • for loading icon done, see ed41bc8
  • prefer using Intersection Observer API to track intersected elements instead of window size and getBoundingClientRect

    • for tabs (replace tab's breakpoint)
    • for downloads bar (replace current calculation)
    • for bookmarks toolbar (replace current calculation)
  • improve start-up time experience making the app shell visible first instead of waiting tab loading (css is render blocking) see Improve startup time #3025

  • cache what can be cached to avoid re-render of known scripts/elements see Improve startup time #3025

  • remove unused styles (bind styles to components w/ Aphrodite)

cezaraugusto added a commit that referenced this issue Aug 4, 2017
cezaraugusto added a commit that referenced this issue Aug 4, 2017
@cezaraugusto cezaraugusto removed this from the 0.20.x (Developer Channel) milestone Aug 15, 2017
dfperry5 pushed a commit to dfperry5/browser-laptop that referenced this issue Aug 18, 2017
@ghost
Copy link

ghost commented Sep 11, 2017

Spoke with @cezaraugusto - the bulk of the effort is completed. Setting milestone to 0.21.x

@ghost ghost added this to the 0.21.x (Nightly Channel) milestone Sep 11, 2017
@bbondy bbondy modified the milestones: 0.21.x (Developer Channel), 0.20.x (Beta Channel), Backlog Oct 25, 2017
@cezaraugusto cezaraugusto removed their assignment Jul 30, 2018
@bsclifton bsclifton added wontfix addressed-with-brave-core Needs confirmation, but this issue may be resolved with Brave Core. labels Sep 19, 2018
@bsclifton bsclifton removed this from the Triage Backlog milestone Sep 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
addressed-with-brave-core Needs confirmation, but this issue may be resolved with Brave Core. perf project-tracking wontfix
Projects
None yet
Development

No branches or pull requests

6 participants