Repository navigation
Address Rubocop Performance Offenses - #26112
Merged
Merged
Conversation
|
Warning This pull request does not link an OpenProject work package. Please add a link to the work package in the description, or reference it in the |
tisba
force-pushed
the
rubocop-performance-offenses
branch
from
October 16, 2026 16:00
845dc38 to
d81ee11
Compare
tisba
force-pushed
the
rubocop-performance-offenses
branch
from
October 16, 2026 16:00
d81ee11 to
dcab0bd
Compare
myabc
approved these changes
Oct 16, 2026
myabc
left a comment
Contributor
There was a problem hiding this comment.
I guess it would be worth quietening some of the pre-existing, non-performance Rubocop issues (e.g. AbcSize) – just to get a green build.
tisba
force-pushed
the
rubocop-performance-offenses
branch
from
October 16, 2026 16:13
dcab0bd to
f1f5004
Compare
Contributor
Author
yeah, I touched code that's 16 years old in some cases. |
Contributor
I know! that deserves extra kudos! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
Passion Time? :)
What are you trying to accomplish?
Improving code quality and performance.
I removed the no-op config to disable
Performance/Casecmp, as it has been retired (disabled by default) some years ago (see rubocop/rubocop-performance#443).What approach did you choose and why?
I ran rubocop with
--only Performance app modules, skipping Specs for now, to keep changes smaller. Every commit addresses only offenses of one cop.While I don't know how hot these code paths are, basically all changes reduce object allocations.
Using
Object.methodfor mapping or in other cases is very expensive (about ~2x slower compared to direct invocation) and should generally be avoided if possible. As an added benefit it makes code navigation for IDE/LSP better.AI involvement
none
Merge checklist