Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More granular and parallelized translations compiling #51928

Merged
merged 3 commits into from
Oct 1, 2021

Conversation

BrettDong
Copy link
Member

@BrettDong BrettDong commented Sep 27, 2021

Summary

Build "More granular and parallelized translations compiling"

Purpose of change

./lang/compile_mo.sh is single-threaded and is slow. Inspired by #51731, I think it'd better leverage make's job parallelism capability.

Describe the solution

Write a Makefile to do the job of ./lang/compile_mo.sh.

Describe alternatives you've considered

?

Testing

  • make localization, or make -C lang, compiles translations as usual
  • Can also specify which subset of languages to compile by `LANGUAGES="ru es_ES"
  • Time to compile translations reduced from 33 seconds to 16 seconds on MSVC GHA workflow, so make -j2 indeed parallelized translations compilation.

Additional context

  • make localization -j16 is super fast
  • It only recompiles MO for a language if its PO file changed

@BrettDong BrettDong added Code: Build Issues regarding different builds and build environments Translation I18n labels Sep 27, 2021
@BrettDong BrettDong changed the title Add Makefile for compiling MO translation files More granular and parallelized translations compiling Sep 27, 2021
@BrettDong BrettDong marked this pull request as ready for review October 1, 2021 16:20
@kevingranade kevingranade merged commit 9f5fa5e into CleverRaven:master Oct 1, 2021
@BrettDong BrettDong deleted the makefile-lang branch October 21, 2021 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code: Build Issues regarding different builds and build environments Translation I18n
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants