Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

perf(ssr): remove filterProperties #5101

Merged
merged 1 commit into from
Jan 7, 2025
Merged

perf(ssr): remove filterProperties #5101

merged 1 commit into from
Jan 7, 2025

Conversation

nolanlawson
Copy link
Contributor

@nolanlawson nolanlawson commented Jan 7, 2025

Details

This is another small perf improvement, on the order of 6-11%. The optimization here is to avoid creating an additional object via filterProperties and instead to do the filtering directly when setting properties on the component.

Screenshot 2025-01-06 at 4 02 34 PM

There are probably more optimizations that can be done here, but starting with this small change.

Does this pull request introduce a breaking change?

  • 😮‍💨 No, it does not introduce a breaking change.

Does this pull request introduce an observable change?

  • 🤞 No, it does not introduce an observable change.

@nolanlawson nolanlawson requested a review from a team as a code owner January 7, 2025 00:04
) {
(this as any)[propName] = props[propName];
}
}
Copy link
Contributor Author

@nolanlawson nolanlawson Jan 7, 2025

Choose a reason for hiding this comment

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

Most of this is copypasta'd from filterProperties. Note this.#props doesn't really matter because we only ever check the class on it.

@nolanlawson nolanlawson merged commit 0b12680 into master Jan 7, 2025
11 checks passed
@nolanlawson nolanlawson deleted the nolan/perf-filter branch January 7, 2025 17:09
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants