-
Notifications
You must be signed in to change notification settings - Fork 115
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
Improve performance of deny_* methods by not raising in prod environments #1632
Conversation
🦋 Changeset detectedLatest commit: b70528c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not blocking, but I was wondering if we could solidify this performance gain somehow in a test in test/performance/
@jonrohan that's a great idea. Maybe we could add a test that ensures the prod version is faster than the non-prod version. Let me see what I can do. |
Description
It was brought to our attention that dotcom spends a lot of time in the
deny_single_argument
method. This PR is an attempt to make it faster by skipping the check in production. We follow a similar approach in other parts of the codebase to avoid raising errors in production, which we should be doing for the variousdeny_*
methods as well. So, we get more consistent behavior and more performance 🤗 Speaking of performance, here's the speedup:I'm seeing an improvement in the 30-35% range.
Integration
No.
Merge checklist
Added/updated documentationAdded/updated previews