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

Translations may be loaded twice during each request #12923

Closed
tsteur opened this issue May 16, 2018 · 2 comments
Closed

Translations may be loaded twice during each request #12923

tsteur opened this issue May 16, 2018 · 2 comments
Labels
wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.

Comments

@tsteur
Copy link
Member

tsteur commented May 16, 2018

You can reproduce this likely by calling eg Plugin\Manager::loadAllPluginsAndGetTheirInfo().

I presume that initially we maybe only load translations for activated or installed plugins or something. Then when calling this method we might load more plugins compared to initially causing $translation->addDirectory() to be called which in return invalidates translations and causes a re-fetch of all translations.

The workaround be to maybe always load all translations of even disabled plugins maybe? (it should be maybe already implemented as we once said this is behaviour we want to have AFAIK).

@tsteur tsteur added the c: Performance For when we could improve the performance / speed of Matomo. label May 16, 2018
@sgiehl
Copy link
Member

sgiehl commented May 17, 2018

Not sure if always loading all translations is that good. For example a plugin could overwrite another plugins translations for any reason. That might not make sense if the plugin is not active

@tsteur
Copy link
Member Author

tsteur commented May 17, 2018

OK all good. I'm thinking this issue actually rarely occurs so we don't need to do anything.

@tsteur tsteur closed this as completed May 17, 2018
@tsteur tsteur added wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it. and removed c: Performance For when we could improve the performance / speed of Matomo. labels May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

2 participants