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

Autoload logic in gvg_bulk_update slows down /wp-admin #18

Open
bobbingwide opened this issue Jun 25, 2024 · 0 comments
Open

Autoload logic in gvg_bulk_update slows down /wp-admin #18

bobbingwide opened this issue Jun 25, 2024 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Jun 25, 2024

The problem that occurs in https://github.com/bobbingwide/gardenvista/issues/33 is due to the fact that All In One SEO is checking for the existance of the bbPress class for each post that it's handling to create the AIOSEO Overview box in the WordPress dashboard.
gvg_bulk_update implements a class autoload function that attempts to locate and load the required class.
This functionality is provided by a shared library originally developed for oik.

Both All In One SEO and the shared library are to blame for the performance issue. I hope that by improving the autoload logic the elapsed time will decrease enough to allow AIOSEO to populate the Overview metabox successfully.

Any fix applied here should be backported to oik and oik-libs.

Proposed solution

Return early when subsequent calls for the same class are detected.

Note: This will not fix the problem in AIOSEO.
There's also the possibility that other plugins that implement autoload may also be using up valuable resources for each call to class_exists( 'bbPress' )... and all the other classes that are being autoloaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant