-
Notifications
You must be signed in to change notification settings - Fork 101
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
PL admin performance can be improved #1015
Comments
It makes sense to store the plugin info in a transient period. (Remember that when external object cache is enabled then transients are stored on object cache.) Just need to make sure that the cache is varied by the plugins it is fetching or else to vary by the Performance Lab plugin version, so that when a new version is released we will get any new plugins showing up right away. As for the transient max age, a day may be excessive. Even just 10 minutes would suffice, right? Granted, the information wouldn't be changing often, and if it does, it's likely to coincide with a new PL plugin release anyway. So in that case, an even longer TTL would be fine. |
@westonruter Since we are fetching data for standalone plugins, do we need to vary its cache by PL plugin version? I think we can simply store it for some time and vary the cache by standalone plugin name. |
Storing it for a set period of time (e.g. 1 day) would be fine. Why vary the cache by the standalone plugins name? |
Oh, because each plugin is queried separately. |
Summary
PL plugin is using
plugins_api()
to retrieve the data of the standalone plugin from the WPOrg API.performance/admin/plugins.php
Lines 21 to 30 in 0f110ff
Currently, when a user loads the admin page it gets fired to retrieve the data of each available plugin:
performance/load.php
Lines 336 to 342 in 0f110ff
Even when the data is retrieved for all plugins, it gets fired again when the user saves the settings or loads the page, and hence page loading time increases.
To avoid hitting the WPOrg API multiple times and reduce the page load time second time onwards, we should consider caching the plugin information for a day or so in the:
The text was updated successfully, but these errors were encountered: