]> git.proxmox.com Git - mirror_edk2.git/commit
.pytool/Plugin/EccCheck: Add performance optimizations
authorMichael D Kinney <michael.d.kinney@intel.com>
Tue, 23 Nov 2021 05:29:38 +0000 (21:29 -0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 29 Nov 2021 06:38:51 +0000 (06:38 +0000)
commit3019f1bbabf1ae413713a9015c07d7cb7dbcb968
treedb999484c15555ee2871f6e2427ab90714e22e54
parent854462bd347974da73d36519c8187554b7719680
.pytool/Plugin/EccCheck: Add performance optimizations

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2986

Improve the performance of EccCheck by using a temp file
instead of stdout to capture the results of the git diff
commands. If a large patch set is passed into EccCheck,
using stdout could be slow and also added the large diff
content to the build log that is redundant information.

A second performance improvement is to filter the
modified directories to remove duplicate directories.
Complex libraries and modules that have subdirectories
with sources would be scanned twice if there were source
changes in both the main directory and subdirectories.
Filter out the subdirectories from the modified directory
list when this case is detected.

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Sean Brogan <sean.brogan@microsoft.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
.pytool/Plugin/EccCheck/EccCheck.py