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

Register only the relevant 3rdParty Theme class in the 3rdPartyTheme provider #6367

Closed
MathieuLamiot opened this issue Jan 8, 2024 · 1 comment · Fixed by #6390
Closed
Assignees
Labels
type: enhancement Improvements that slightly enhance existing functionality and are fast to implement
Milestone

Comments

@MathieuLamiot
Copy link
Contributor

MathieuLamiot commented Jan 8, 2024

Context

Reduce the plugin CPU usage: https://wp-media.slack.com/archives/CUT7FLHF1/p1704447166535709
There is only up to one theme used on a WordPress website but we currently register (and load) all 3dr party theme compatiblity classes.

Expected behavior
When loading the plugin, only up to one 3rd Party theme compatibility class must be loaded. It must be the one corresponding to the theme currently used by the website, or none if no known theme is used.
See this Slack suggestion

How to check results with XDebug
https://wp-media.slack.com/archives/CUT7FLHF1/p1704728991213049

@MathieuLamiot MathieuLamiot added the needs: r&d Needs research and development (R&D) before a solution can be proposed and scoped. label Jan 8, 2024
@MathieuLamiot MathieuLamiot changed the title Register only the relevant 3rdParty Theme class in the 3rdPartyTheme provider [R&D] Register only the relevant 3rdParty Theme class in the 3rdPartyTheme provider Jan 8, 2024
@remyperona remyperona self-assigned this Jan 17, 2024
@MathieuLamiot MathieuLamiot changed the title [R&D] Register only the relevant 3rdParty Theme class in the 3rdPartyTheme provider Register only the relevant 3rdParty Theme class in the 3rdPartyTheme provider Jan 18, 2024
@MathieuLamiot
Copy link
Contributor Author

Not R&D anymore -> Let's make this production-ready if it is not already, and move forward for the next minor.
Well done 💪

@remyperona remyperona added type: enhancement Improvements that slightly enhance existing functionality and are fast to implement and removed needs: r&d Needs research and development (R&D) before a solution can be proposed and scoped. labels Jan 24, 2024
@Mai-Saad Mai-Saad self-assigned this Feb 9, 2024
@piotrbak piotrbak added this to the 3.15.10 milestone Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improvements that slightly enhance existing functionality and are fast to implement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants