Skip to content

Reduce allocations in Slotable#register_default_slots #2328

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

Merged
merged 2 commits into from
Jun 2, 2025

Conversation

jdelStrother
Copy link
Contributor

While profiling something unrelated I noticed a lot of unnecessary string allocations in Slotable#register_default_slots. How about this change to move it out of the instance_methods loop?

@jdelStrother
Copy link
Contributor Author

I've struggled to reproduce those CI failures locally, are they something I've introduced?

I wasn't sure how exhaustive the ruby-versions mentioned in render_inline_allocations were supposed to be, let me know if you rather I drop that commit

@joelhawksley joelhawksley merged commit 8ecd4dd into ViewComponent:main Jun 2, 2025
24 of 25 checks passed
@joelhawksley
Copy link
Member

@jdelStrother those PVC failures are from the PVC test suite being tied to the v4 branch ❤️

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.

2 participants