Describe the bug
Using the latest version 4.3.1 (also reproducible with 4.2.1 and latest main), I noticed that the translation with DeepL takes very long, something between 25 seconds up to about 1 minute. This is not really usable.
To find the problem I debugged / profiled and found out that the part that is taking so long is fetching the entire page tree for the site (!) in
So, not the DeepL translation is taking so long. This is actually quite fast. Fetching all pages in a site for the glossary is causing the performance problems.
I am currently not using the glossary. The glossary is empty (no records).
To Reproduce
Steps to reproduce the behavior:
Use a site with many pages
translate content with "DeepL" button (not auto)
Expected behavior
I would expect:
to make it possible to define a page for the glossary and deactivate recursive behaviour, but not seen a way to do that:
inDeeplService::translateRequest, if sourceLanguage is not "auto", the function getGlossaryBySourceAndTarget is called, which calls getGlossary with recursive = true (!)
I don't see the need to fetch glossary entries on every translation request. This can be uploaded to DeepL once and maintained via a housekeeping script e.g. via cron or on demand
ideally make it possible to deactivate the local glossary entirely / upload a glossary via other service and use that
Screenshots
TYPO3 Setup
TYPO3 Version: 11.5.37
Server: Apache + php-fpm
Database type and version: 10.4.19-MariaDB MariaDB Server
PHP version: 8.2
DeepL free or paid API: paid
composer: yes
Development context
Additional context
We were one of the sponsors for the glossary. (Carl von Ossietzky Universität Oldenburg). I have been using an older (patched) version of this extension. I would now like to update to latest version. I really like this extension and would like to use the new features. Not really happy with the disruption of a quite stable extension by adding (not production ready) glossary feature, though.
Describe the bug Using the latest version 4.3.1 (also reproducible with 4.2.1 and latest main), I noticed that the translation with DeepL takes very long, something between 25 seconds up to about 1 minute. This is not really usable.
To find the problem I debugged / profiled and found out that the part that is taking so long is fetching the entire page tree for the site (!) in
GlossaryRepository::getGlossariesInRootByCurrentPage:
So, not the DeepL translation is taking so long. This is actually quite fast. Fetching all pages in a site for the glossary is causing the performance problems.
I am currently not using the glossary. The glossary is empty (no records).
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect:
DeeplService::translateRequest
, ifsourceLanguage
is not "auto", the functiongetGlossaryBySourceAndTarget
is called, which callsgetGlossary
with recursive = true (!)Screenshots
TYPO3 Setup
Additional context
We were one of the sponsors for the glossary. (Carl von Ossietzky Universität Oldenburg). I have been using an older (patched) version of this extension. I would now like to update to latest version. I really like this extension and would like to use the new features. Not really happy with the disruption of a quite stable extension by adding (not production ready) glossary feature, though.