]> git.proxmox.com Git - mirror_qemu.git/commit
rules.mak: speedup save-vars load-vars
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 2 Nov 2016 15:10:23 +0000 (16:10 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 22 Dec 2016 15:00:23 +0000 (16:00 +0100)
commit5ffb3505412b08fb6398748de7eb0fb2cfbfe4e7
treeecf33b4bbb55afcca9aa988675f9dedfd7dce97a
parenteb7a20a3616085d46aa6b4b4224e15587ec67e6e
rules.mak: speedup save-vars load-vars

Unnesting variables spends a lot of time parsing and executing foreach
and if functions.  Because actually very few variables have to be
saved and restored, a good strategy is to remember what has to be done
in load-vars, and only iterate the right variables in load-vars.
For save-vars, unroll the foreach loop to provide another small
improvement.

This speeds up a "noop" build from around 15.5 seconds on my laptop
to 11.7 (25% roughly).

Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
rules.mak