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

Optimize WP-CLI update_option #11

Open
Mte90 opened this issue Oct 12, 2022 · 0 comments
Open

Optimize WP-CLI update_option #11

Mte90 opened this issue Oct 12, 2022 · 0 comments

Comments

@Mte90
Copy link

Mte90 commented Oct 12, 2022

https://github.com/charlyie/resmushit-wordpress/blob/01872a597fa336ef2b2c76e9fa77532cd1c86768/classes/resmushitWPCLI.class.php#L126-L130

As you can see here this means that if you have like 48000~ images for any image process there is a db query this is not good for performances...

My suggestions is to do that line before the foreach and after that in this way it is happening just twice.

PS: maybe a parameter to change the value about the maximum file number in this way I don't have to wait that finishes every 1000 but maybe every 10000.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant