Project

General

Profile

Actions

Bug #106037

open

EXT:form Backend module can run into timeout on large sites

Added by Frank Berger 17 days ago. Updated 16 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2025-01-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

On a large setup with many sites (hundreds) and similar numbers of forms (483 in my example) and lots of references (+2000) the form backend module often runs into timeouts when simply loading the list of forms.

The culprit actually is the way

TYPO3\CMS\Form\Service\DatabaseService->getAllReferencesForFileUid()
and consequently
TYPO3\CMS\Form\Service\DatabaseService->getAllReferences()
tries to load these from sys_refindex

Here essentially a

SELECT ref_uid FROM sys_refindex WHERE softref_key='formPersistenceIdentifier' and ref_uid > 0;

is executed, which fails to match any index, resulting in a full table scan, grinding the task to a halt on large setups (sys_refindex has a count of 3 Million+ entries)

I added the following to my Sitepackage, solving the Problem:

CREATE TABLE sys_refindex (
    KEY idx_softref_key (softref_key,ref_uid)
);

I am filing this for EXT:form / Form Framework as it is the only example I found where the sys_refindex is queried like that, but it could be something for the core as well, if the sys_refindex is intended to be used in this way.

Actions #1

Updated by Garvin Hicking 17 days ago

That sounds effective to use a key here. Would you like to propose a patch yourself maybe? Should be doable with an ext_tables.sql change only (in typo3/sysext/core/ext_tables.sql line 235)?

Actions #2

Updated by Frank Berger 16 days ago

will do!

Actions #3

Updated by Christian Kuhn 16 days ago ยท Edited

please add it to ext:form ext_tables.sql, not to ext:core. There is an index for a similar query for ext:form already.

Actions

Also available in: Atom PDF