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

Perf: Avoid creation of intermediary array when iterating over style rules #1272

Merged
merged 3 commits into from
Aug 15, 2023

Conversation

eoghanmurray
Copy link
Contributor

@changeset-bot
Copy link

changeset-bot bot commented Aug 1, 2023

🦋 Changeset detected

Latest commit: 9c4c5fe

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
rrweb-snapshot Patch
rrweb Patch
rrdom Patch
rrdom-nodejs Patch
rrweb-player Patch
@rrweb/types Patch
@rrweb/web-extension Patch
rrvideo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@JonasBa JonasBa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

@Juice10
Copy link
Contributor

Juice10 commented Aug 4, 2023

I'm happy to merge this once we have benchmarks running on CI

@JonasBa
Copy link
Contributor

JonasBa commented Aug 4, 2023

@Juice10 If you plan on doing that in github actions just note that performance may vary quite a lot there. We (sentry) collect performance data and profiles from a lot of our CI runs and we see numbers vary about 30% for the same runners.

@Juice10
Copy link
Contributor

Juice10 commented Aug 4, 2023

@JonasBa I'm hoping we can do relative benchmarking (more info https://labs.quansight.org/blog/2021/08/github-actions-benchmarks ) to help with this. But it's definitely a valid concern.

I'm not sure if there are any companies like https://buildjet.com that offer dedicated resources for benchmarking.

@JonasBa
Copy link
Contributor

JonasBa commented Aug 11, 2023

@JonasBa I'm hoping we can do relative benchmarking (more info https://labs.quansight.org/blog/2021/08/github-actions-benchmarks ) to help with this. But it's definitely a valid concern.

I'm not sure if there are any companies like https://buildjet.com that offer dedicated resources for benchmarking.

@Juice10 yes, that is a good approach if you plan on using github's runners as your benchmarking infra. I would probably invest into seeing if it's possible to have an automated workflow that re-runs the benchmarks a few times so that they hopefully run on different runners - this could help improve the signal to noise ratio.

@eoghanmurray
Copy link
Contributor Author

To note: MooTools versions less than 1.6 add an Array.from to the Array prototype, which doesn't have the second argument; they symptoms are

<style>
[object CSSStyleRule][object CSSStyleRule][object CSSStyleRule][object CSSStyleRule][object CSSStyleRule][object CSSStyleRule][object CSSStyleRule][object CSSStyleRule][object CSSStyleRule][object CSSStyleRule][object CSSS

I don't know if we should guard against this similar to #1196 ...

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.

3 participants