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

MONGOID-5805 Short-circuit the logic in extract_attribute to fix performance regression (backport to 8.1-stable) #5869

Merged

Conversation

jamis
Copy link
Contributor

@jamis jamis commented Sep 20, 2024

Fixes a performance regression caused by always splitting keys at . characters, whether the string has them or not. By short-circuiting the common case, we can recover a significant performance improvement. (Backport from master.)

@jamis jamis marked this pull request as ready for review September 20, 2024 21:45
@jamis jamis merged commit 9e2d6ff into mongodb:8.1-stable Sep 23, 2024
54 of 59 checks passed
@jamis jamis deleted the 5805-performance-regression-8.1-stable branch September 23, 2024 17:16
jamis added a commit to jamis/mongoid that referenced this pull request Oct 16, 2024
…ormance regression (backport to 8.1-stable) (mongodb#5869)

* short-circuit the logic in extract_attribute to fix performance regression

* short circuit on anything that's not a document or hash

* handle hash/string keys
jamis added a commit that referenced this pull request Oct 17, 2024
* MONGOID-5815 Respect client_override for new docs (#5880)

* MONGOID-5805 Short-circuit the logic in extract_attribute to fix performance regression (backport to 8.1-stable) (#5869)

* short-circuit the logic in extract_attribute to fix performance regression

* short circuit on anything that's not a document or hash

* handle hash/string keys

---------

Co-authored-by: Dmitry Rybakov <[email protected]>
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