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

Excessive DOM Size #210

Open
rwestlund opened this issue May 16, 2018 · 0 comments
Open

Excessive DOM Size #210

rwestlund opened this issue May 16, 2018 · 0 comments

Comments

@rwestlund
Copy link
Contributor

Lighthouse recommends keeping a web app under total 1500 nodes:
https://developers.google.com/web/tools/lighthouse/audits/dom-size

A single instance of paper-date-picker (v2.0.0) creates creates 556 DOM nodes, which blows more than a third of the DOM budget!

I have paper-date-picker in a card element that I show a list of. This causes my DOM size to balloon into tens of thousands of nodes, which is unusably slow.

It's so slow to stamp that I wonder whether somewhere under the hood the iterations are causing layout thrashing:
https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing#avoid_layout_thrashing

Anyhow, it looks like the bulk of it is coming from paper-calendar. It's stamping three months at once, with several levels of dom-repeat. Reducing the number of nodes to stamp a month and/or not stamping invisible months would have a large impact on performance. I think the goal should be to get this under 100 nodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant