Performance issues due to ZendCacheDriver (in 8.3.2)

Permalink
In my PHP slow log, which logs requests that take over 20 seconds, I see the following log output frequently:

[27-Apr-2020 08:56:15]  [pool www] pid 21439
script_filename = /var/www/prod/index.php
[0x00007faf23215a70] file_put_contents() /var/www/prod/concrete/src/Cache/Driver/FileSystemStashDriver.php:43
[0x00007faf23215970] storeData() /var/www/prod/concrete/vendor/tedivm/stash/src/Stash/Driver/Composite.php:166
[0x00007faf23215880] actOnAll() /var/www/prod/concrete/vendor/tedivm/stash/src/Stash/Driver/Composite.php:104
[0x00007faf232157e0] storeData() /var/www/prod/concrete/vendor/tedivm/stash/src/Stash/Item.php:446
[0x00007faf232156f0] executeSet() /var/www/prod/concrete/vendor/tedivm/stash/src/Stash/Item.php:406
[0x00007faf23215670] save() /var/www/prod/concrete/src/Cache/Adapter/ZendCacheDriver.php:95
[0x00007faf232155a0] internalSetItem() /var/www/prod/concrete/vendor/zendframework/zend-cache/src/Storage/Adapter/AbstractAdapter.php:688
[0x00007faf232154c0] setItem() /var/www/prod/concrete/vendor/zendframework/zend-i18n/src/Translator/Translator.php:601
[0x00007faf23215370] loadMessages() /var/www/prod/concrete/vendor/zendframework/zend-i18n/src/Translator/Translator.php:442
[0x00007faf23215260] getTranslatedMessage() /var/www/prod/concrete/vendor/zendframework/zend-i18n/src/Translator/Translator.php:356
[0x00007faf23215190] translate() /var/www/prod/concrete/src/Localization/Translator/Adapter/Zend/TranslatorAdapter.php:69
[0x00007faf232150f0] translate() /var/www/prod/concrete/bootstrap/helpers.php:25
[0x00007faf23215030] t() /var/www/prod/concrete/elements/dashboard/mobile_menu.php:16


This is from just navigating the site (logged-in on mobile).
Apparently the Translator tries to save a file via the ZendCacheDriver, as seen in the first line: file_put_contents().

This is a site that only uses one language, there are never any translations done of any kind. This happens on just any READ-ONLY request. It takes more than 20 seconds and affects the general performance of the site (mostly for logged-in users, i.e. authors), even just loading a page.

Can this be disabled somehow? There is no need to save translations or update a cache. If there is a lifetime config value for this particular cache, then I would like to set it to indefinitely.

I also think this performance issue might affect most concrete5 installations, so possibly something to fix / optimize by the concrete5 devs?

Note that it happens in 8.3.2, I have not tested it in 8.5.2. If this is already fixed in a later version then please ignore :) Still, I would like to disable it via some configuration.

entreprenr