diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-08-17 15:33:12 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-08-18 08:11:25 +0200 |
commit | b14601da7b42f2b68bb098fc04e267a390f201c2 (patch) | |
tree | 4131da13688ea480da40a14b30ebe8262e2335b1 /docs/markdown/Using-the-WrapDB.md | |
parent | fcf9746232efd03970c963e9e5207e1ec8dc99fd (diff) | |
download | meson-b14601da7b42f2b68bb098fc04e267a390f201c2.zip meson-b14601da7b42f2b68bb098fc04e267a390f201c2.tar.gz meson-b14601da7b42f2b68bb098fc04e267a390f201c2.tar.bz2 |
ninjabackend: optimize length_estimate
Optimize the regular expression so that the variable expansion part
always ends up in group 1, and the trailer after the variable is discarded
in the same match. Do not use re.sub to remove braces, and do not bother
building the expanded command, just adjust the estimated length on the fly.
functools.reduce is extremely slow, so I am keeping ' '.join(chunk).
On a QEMU build the time spend in the function goes from 1.072s to 0.757s.
Diffstat (limited to 'docs/markdown/Using-the-WrapDB.md')
0 files changed, 0 insertions, 0 deletions