project-chip/connectedhomeip

Parallelize code generation for jinja files and code formatting

Open

#38.775 aberto em 6 de mai. de 2025

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)C++ (1.659 forks)batch import
good first issuestale

Métricas do repositório

Stars
 (6.410 stars)
Métricas de merge de PR
 (Mesclagem média 8d 5h) (375 fundiu PRs em 30d)

Description

We want to have fast iteration speed on code generation. https://github.com/project-chip/connectedhomeip/blob/master/scripts/py_matter_idl/matter/idl/generators/cpp/sdk/sdk_generator.py#L120 currently generates a LOT of files and could benefit from paralelization

Update code logic to do parallel generation and test out if this improves runtime (i.e. if it is worth it - this issue was created on the assumption that it is, however we should verify that).

We also do file formatting and those seem to call one single exec to format many files at once. We should investigate if splitting files per cpu count improves formatting (i.e. is clang-format and kotlin-format single threaded or multi-threaded?)

Guia do colaborador