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.
Inspired by #1314 and a recent example where I caught another n+1 problem in a PR review, I think we (devs) need some way to quiclky catch those problems. I found the one in #1314 fairly randomly and it could have stayed undiscovered for quite some more time. It's just an easy mistake to make. Is the n+1 problem really that bad? Well, it's not the worst but having this in the code base is dangerous as it can lead to unexpected slowness. And then you usually notice it in production at an inconvenient time. That would suck.
I also think it would be useful to more clearly see the duration of a request to notice when there are slow SQL queries for example. This information is already logged in
trace
level, but we usually don't run with that level during development and even then, it's easy to overlook it in the logs.So I started this small experiment of adding a debug overlay so that we devs cannot escape that information. There are many open questions and todos:
localhost
? When built in debug mode? We might want to see this on test deployments as well?