-
Notifications
You must be signed in to change notification settings - Fork 54
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
Add more performance-related checks #443
Comments
Thanks for opening this @swissspidy! +1 on brainstorming here which additional performance related checks could be valuable. cc @mukeshpanchal27 @joemcgill @westonruter @adamsilverstein Sharing further ideas here, some of which I dug up from an earlier design exploration from 1.5 years ago:
|
The corresponding PHPCS sniff does not yet support the new
We already have
I'd say this is impossible with static analysis, caching & query parts are not always co-located. So would need a runtime check. Could even be as simple as this:
Downside:
Hmm I could swear there was a ticket for this somewhere or even an existing sniff, but can't find anything right now 🤔 For a static check we'd need someone who's good at writing PHPCS sniffs. Some more performance sniffs from https://github.com/Automattic/VIP-Coding-Standards we're not currently using:
|
I'm going to work on breaking out issues to further explore these ideas. I started with #467 @swissspidy what do you think about adding a |
@swissspidy do you think this one is worth adding? I'm sure there are legitimate use cases for doing this, eg. slow API. Still not a good idea generally so maybe worth a warning? |
We could add it, but not with a high priority. Such requests are usually cached or running in background jobs, so real user impact is low. And overall it's not super common I'd say. So such a check wouldn't have the biggest impact IMO. |
This comment was marked as resolved.
This comment was marked as resolved.
I think we can close this one for now as we created sub-issues for the things we wanted to implement. |
Right now the following performance-related checks or enhancements are proposed:
Non_Blocking_Scripts_Check
: Warn about enqueued scripts that use neitherdefer
norasync
#467Ideally we'd have many more of those, so I am opening this issue for us to do some brainstorming.
The text was updated successfully, but these errors were encountered: