Parallelize config translation import

Created on 25 March 2025, about 2 months ago

Problem/Motivation

Spin off from Add a non blocking batch runner Active - neither blocking nor blocked by that issue but should work well alongside it.

Importing config translations currently happens as a blocking step at the end of the installer. I think we can parallelize it by using Fibers and async guzzle requests to fetch the files.

We can issue 5-10 async http requests per batch iteration, as soon as the first file has downloaded, process that one, then go through the rest. Once it works, we can experiment with how many translations to fetch per batch.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component

install system

Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @catch
  • 🇬🇧United Kingdom catch

    So a flaw with this that I didn't realise until looking a bit closer is there's only one .po file for core, meaning this wouldn't benefit this much at all.

    However it ought to help install_finish_translations where I think we'll be getting a file per language per contrib module - just won't be visible in Umami.

  • 🇬🇧United Kingdom catch

    Re-titling, it's not really the config translation itself but the contrib translation lookups from d.o that could be done async.

    However even if there are 200 of those, the bigger problem is StringDatabaseStorage::save() which does several database queries for every string.

Production build 0.71.5 2024