]> git.proxmox.com Git - mirror_edk2.git/commit
BaseTools: AutoGen and GenFds share the parser data.
authorZhao, ZhiqiangX <zhiqiangx.zhao@intel.com>
Fri, 23 Nov 2018 07:04:45 +0000 (15:04 +0800)
committerBobCF <bob.c.feng@intel.com>
Fri, 7 Dec 2018 02:12:05 +0000 (10:12 +0800)
commitb3497bad1221704a5dbc5da0b10f42625f1ad2ed
tree989859b17dcc6b025448be11a0530f8e39670779
parent34e733f2000cfad7645651fac9ab79a237b95481
BaseTools: AutoGen and GenFds share the parser data.

V2:
Extract the common part of new API and the original main() function
into one function.

V1:
https://bugzilla.tianocore.org/show_bug.cgi?id=1288

Currently, AutoGen and GenFds run in different python interpreters. The
parser are duplicated. This patch is going to create new API for GenFds
and have the build to call that API instead of executing GenFds.py. As
such, the GenFds and build can share the parser data.

This patch is expected to save the time of GenFds about 2~3 seconds.
More details will be logged in BZ.

This is the summary measure data generated from python cProfile for
building Ovmf.

Currently:
8379147 function calls (8135450 primitive calls) in 12.580 seconds

After applying this patch:
3428712 function calls (3418881 primitive calls) in 8.944 seconds

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: ZhiqiangX Zhao <zhiqiangx.zhao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Carsey Jaben <jaben.carsey@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
BaseTools/Source/Python/AutoGen/AutoGen.py
BaseTools/Source/Python/GenFds/GenFds.py
BaseTools/Source/Python/build/build.py