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

The site_transient_update_{$type}s filter doesn't scale #2

Open
Chouby opened this issue Jul 15, 2020 · 0 comments
Open

The site_transient_update_{$type}s filter doesn't scale #2

Chouby opened this issue Jul 15, 2020 · 0 comments

Comments

@Chouby
Copy link

Chouby commented Jul 15, 2020

On my local test install, I noticed that, when Polylang Pro was activated, the plugins list page was very slow. The load time was about 20s for around 300 plugins. The issue was coming from our class PLL_T15S which is an adaptation from your project.

I narrowed the issue to the calls to wp_get_installed_translations() and get_available_languages() which are called once per plugin and become very expensive when there are a lot of translation files.

I fixed the issue in Polylang by making sure that these functions are called only once for all plugins. See my commit: polylang/polylang@6f9814b. The page load time decreased from 20 s to 2 s.

Hope it helps.

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