Php7.4-zip very slow loading

I updated php to version 7.4.12 and got the problem with extremely slow site loading. Approximately 1-2 minutes per page. I started to solve the problem and found out that if I remove the php7.4-zip module, then the site works fine, but problems start with not installed php-zip and as a result, I cannot use my site normally. Also, without the zip module, errors go to the logs.

Error no app in context Symfony\Component\Routing\Exception\RouteNotFoundException: Unable to generate a URL for the named route “photos.page.index” as such route does not exist.

/var/www/nextcloud/lib/private/Route/Router.php - line 338:

Symfony\Component\Routing\Generator\UrlGenerator->generate()

/var/www/nextcloud/lib/private/URLGenerator.php - line 83:

OC\Route\Router->generate()

/var/www/nextcloud/lib/private/NavigationManager.php - line 294:

OC\URLGenerator->linkToRoute()

/var/www/nextcloud/lib/private/NavigationManager.php - line 115:

OC\NavigationManager->init()

/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php - line 183:

OC\NavigationManager->getAll()

/var/www/nextcloud/lib/private/legacy/OC_Defaults.php - line 263:

OCA\Theming\ThemingDefaults->getShortFooter()

/var/www/nextcloud/lib/public/Defaults.php - line 169:

OC_Defaults->getLongFooter()

/var/www/nextcloud/core/templates/layout.guest.php - line 55:

OCP\Defaults->getLongFooter()

/var/www/nextcloud/lib/private/Template/Base.php - line 178:

include("/var/www/ne … p")

/var/www/nextcloud/lib/private/Template/Base.php - line 150:

OC\Template\Base->load()

/var/www/nextcloud/lib/private/legacy/OC_Template.php - line 182:

OC\Template\Base->fetchPage()

/var/www/nextcloud/lib/private/legacy/OC_Template.php - line 213:

OC_Template->fetchPage()

/var/www/nextcloud/lib/private/Template/Base.php - line 132:

OC_Template->fetchPage()

/var/www/nextcloud/lib/private/legacy/OC_Template.php - line 275:

OC\Template\Base->printPage()

/var/www/nextcloud/lib/base.php - line 667:

OC_Template::printGuestPage()

/var/www/nextcloud/lib/base.php - line 1094:

OC::init()

/var/www/nextcloud/index.php - line 35:

require_once("/var/www/ne … p")

NC 19.0.4

Without looking into details just searching for the error messages: