Review 14.3 Merged

94337[BUGFIX] Avoid redundant scans during language pack updates

Christian Kuhn CR +2 V +2 Easy +11 −9 updated 06/05/26, 11:52

Commit message

Updating language packs is slow since the v14 localization
related changes.

LanguagePackService::getExtensionLanguagePackDetails() iterates
over all active packages and probes the filesystem for *.xlf files.
The existence check uses Finder::count(), which is short-circuited
to hasResults() to exit on first match.

The bigger win is reducing how often this method runs.
languagePackDownload() calls getExtensionLanguagePackDetails() on
every invocation to guard against arbitrary key/iso input from the
install tool's languagePacksUpdatePackAction(). The 'language:update'
CLI command calls languagePackDownload() once per extension and per
active language, so each invocation re-runs the full scan. On an
instance with N extensions and L active languages this meant N*L+1
scans per language:update run.

The patch moves the guard where untrusted input actually lives:
The install tool's languagePacksUpdatePackAction() now calls
getExtensionLanguagePackDetails() once and gates the key/iso
pair before delegating to the service.

Measured on an install with 34 extensions and 23 active languages,
the patch saves about 7.0 seconds per language:update run before
network transfer.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
  • Verified V +2 Done
    • Christian Kuhn +2
    • core-ci +1 CI

Issues 1

Files 3

Review log 34

  1. Christian Kuhn uploaded patch set 1 06/05/26, 11:40

  2. core-ci voted on patch set 1 V +1 06/05/26, 11:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103027

  3. Christian Kuhn voted on patch set 1 CR +2 V +2 06/05/26, 11:52

  4. Christian Kuhn merged patch set 2 06/05/26, 11:52