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

Collect stylesheet once per plugin #1456

Merged
merged 2 commits into from Aug 12, 2021
Merged

Collect stylesheet once per plugin #1456

merged 2 commits into from Aug 12, 2021

Conversation

TrySound
Copy link
Member

@TrySound TrySound commented Mar 29, 2021

computeStyle(node) in isolation is quite slow utility because it
collects style elements across whole document, parses and sort them.

In this diff I splitted it into collectStylesheet(root) and
computeStyle(stylesheet, node) which are easy integrate with new
visitor plugin api.

cc @XhmikosR

computeStyle(node) in isolation is quite slow utility because it
collects style elements across whole document, parses and sort them.

In this diff I splitted it into `collectStylesheet(root)` and
`computeStyle(stylesheet, node)` which are easy integrate with new
visitor plugin api.
@TrySound TrySound requested a review from deepsweet March 29, 2021 08:35
@XhmikosR
Copy link
Contributor

XhmikosR commented Mar 29, 2021

Wow, impressive!

master avg 3 runs: 191s
stylesheet-cache avg 3 runs: 120s

Approximately -37%.

Nice!

@TrySound TrySound merged commit 2c0c361 into master Aug 12, 2021
@TrySound TrySound deleted the stylesheet-cache branch August 12, 2021 00:08
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

Successfully merging this pull request may close these issues.

None yet

3 participants