The batched translation preload requires the (tableName, recordNum, prefix) index; without it the per-record query scans and is slower than the legacy per-field lookup. t() now checks once per PHP process (static) whether idx_tabla_registro_prefijo exists, creates it on the fly when the DB user has ALTER rights (re-checking after a lost race), and otherwise falls back to the legacy per-field query — never slower than the original behavior on webs where the index cannot be created. Verified live: dropped the index on villagrancanaria local, first request recreated it automatically and subsequent renders stayed fast.
37 KiB
Executable File
37 KiB
Executable File