Make it possible to generate po files in parallel
ClosedPublic

Authored by apol on Feb 23 2018, 6:30 PM.

Details

Summary

Instead of going file by file, feed them to cmake at once.
Should improve build times on some systems.

Test Plan

tests still pass, got kalgebra translated

Diff Detail

Repository
R249 KI18n
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
apol created this revision.Feb 23 2018, 6:30 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 23 2018, 6:30 PM
apol requested review of this revision.Feb 23 2018, 6:30 PM
sitter added a comment.Mar 5 2018, 1:12 PM

As discussed on telegram: the proposed change makes it a different problem. Now instead of running serial all the time, it'd fork bomb all the time (peaks at 3671 forks for plasma-desktop 5.12 when run on a fairly fast system with SSD).

Also, missing adjustment to build-tsfiles.cmake ;)

apol updated this revision to Diff 28724.Mar 5 2018, 3:01 PM

Make sure we don't run more than nproc processes at the same time

sitter added a comment.Mar 6 2018, 7:51 AM

Ingenious code!

You left some debug clutter behind though.

Also, the if i statement is inconsistent between the two files

if (i EQUAL ${numberOfProcesses}) vs. if (i GREATER ${numberOfProcesses})

cmake/build-pofiles.cmake
45

I think !(code EQUAL 0) may be more explicit here.

62

debug

63

no space after if.

64

debug

apol updated this revision to Diff 28845.Mar 6 2018, 4:11 PM
apol marked 3 inline comments as done.

Remove debug info and spaces

apol updated this revision to Diff 28846.Mar 6 2018, 4:11 PM

EQUAL

sitter added inline comments.Mar 7 2018, 10:03 AM
cmake/build-tsfiles.cmake
75

This doesn't belong here, does it? It's also defined in execute_process() and from looking at the docs it would only be set once.

apol updated this revision to Diff 29024.Mar 8 2018, 5:02 PM

Fix typo

apol marked an inline comment as done.Mar 8 2018, 5:02 PM
sitter accepted this revision.Mar 9 2018, 3:54 PM
This revision is now accepted and ready to land.Mar 9 2018, 3:54 PM
This revision was automatically updated to reflect the committed changes.