Conversation
Why are these changes being introduced: * This app has a history of poor performance in production that we have been able to slowly adjust by investigating N+1 queries * The bullet gem gives us a more structured way of detecting, logging, and addressing these types of issues during development so we can avoid pushing new problems into production Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/ETD-569 * https://mitlibraries.atlassian.net/browse/ETD-570 * https://mitlibraries.atlassian.net/browse/ETD-609 * https://mitlibraries.atlassian.net/browse/ETD-608 How does this address that need: * Adds Bullet gem and associated configuration * Using application in development and test envs, used the information provided to address N+1 queries and removed a few over eager loads. Document any side effects to this change: * Running Bullet as part of our test suite would be ideal, but administrate is a bit complicated to fix the reported issues. We could probably ignore all of the administrate errors, but it was not yet clear if that was a good path so leaving it disabled in test is the current plan. * There are some over eager loads that track back to ActiveStorage. From my reading of the documentation, we are doing the calls properly so it wasn't clear yet how to proceed.
jazairi
approved these changes
Mar 8, 2023
Contributor
jazairi
left a comment
There was a problem hiding this comment.
I haven't tested this with prod data to see how it affects real-world performance, but the changes here make sense to me. I agree with the decision not to enable bullet in test for now. Glad you stumbled upon this gem -- seems like it'll be useful!
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why are these changes being introduced:
Relevant ticket(s):
How does this address that need:
Document any side effects to this change:
Developer
our guide and
all issues introduced by these changes have been resolved or opened as new
issues (link to those issues in the Pull Request details above)
Code Reviewer
(not just this pull request message)
Requires database migrations?
NO
Includes new or updated dependencies?
YES