Don’t scan translations every admin panel is accessed
-
Hey!
I think this plugin is really great but only issue I have noticed that if you have a lot of plugins and themes, it can make the string translation panel very slow. It can take 10-30 seconds to load every time you click anything. This seems to be caused by the fact that the plugin scans all themes and plugins on every page load.
This makes it very time-consuming to edit the translations, particularly in production environments where translations very rarely change anyway.
Would it be possible to implement some kind of cache so that the files are scanned for example every five minutes or something like that because results are saved as a transient? This could be an optional feature implemented using a filter.
Then a small third-party plugin could for example check the current wp_environment_type or the presence of WP_DEBUG variable and set this filter accordingly to enable cache.
This would allow instantly updating translations in a local environment and improve loading speed in a production environment. Let me know what you think! If you think it’s a good idea I could create a fork of this plugin with this feature which could be then merged into the plugin.
Thanks!
- The topic ‘Don’t scan translations every admin panel is accessed’ is closed to new replies.