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.
this pr removes
OpenStruct
from runtime logic.OpenStruct
defines methods at runtime and by that invalidates the global method cache which can impose quite a significant performance penalty as demonstrated here and there. this is critical using it in larger rails applications, for example.there have been patches proposed (9262, 8426, 7816) to mri but as far as i can see no real progress was made.
also, this reddit thread is quite insightful with comments as recent as 1 year ago.