audk/BaseTools/Source/Python/Common
Jaben Carsey b23414f654 BaseTools: AutoGen refactor ModuleAutoGen caching
1) Add a new file Common/caching.py
    a.	Allows for automated caching of repeated class functions, class
        properties, and non-class functions
    b.	When called the first time the value is cached and if called a
        second time, the cached result is called, not the function.
    c.	When used, this saves lots of memory since the actual function
        pointers are replaced with smaller data elements.
    d.  note that not all features are used yet.
2) Fix AutoGen/GenMake and AutoGen/GetC to not call into private member
    variables of ModuleAutoGen class
    a. use the existing accessor properties for the data
3) Change AutoGen classes to remove a exception for duplicate members in
    __new__ and use ?in? testing to speed up
4)	Work on ModuleAutoGen class
    a.	Change all properties that use caching to use @caching_property
        (see #1 above)
    b.	Change all properties that do not use caching to use standard python
        decorator "@property"
    c.	Change all cases where a dictionary/set/list/object was created
        and then immediately updated to use constructor parameters
    d.	Refactor each property function to remove the internal variable
        that is no longer needed (this helps find items like #2 above)
    e.  Refactor _ApplyBuildRule with optional parameter to work around
        circular dependency with BinaryFileList.

Note that 4e was almost certainly unintended as the functions were acting on
incomplete information since they were directly accessing private instance
variables at the same time another function on the stack was creating the same
private isntance data.

This overall changes behavior slightly, but makes the codebase smaller and
easier to read.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2018-08-20 10:53:05 +08:00
..
Edk2 BaseTools/Capsule: Add Capsule Generation Tools 2018-08-02 14:35:20 -07:00
Uefi BaseTools/Capsule: Fix CertType GUID byte order 2018-08-02 14:35:24 -07:00
BuildToolError.py BaseTools: introduce !error statement 2018-06-22 13:38:40 +08:00
BuildVersion.py BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
DataType.py BaseTools: Adjust the spaces around commas and colons 2018-06-27 16:33:25 +08:00
Database.py BaseTools: Use absolute import in Common 2018-07-16 11:22:16 +08:00
EdkLogger.py BaseTools/Ecc: Fix import issues 2018-08-16 09:42:55 +08:00
Expression.py BaseTools: Remove the redundant if statement 2018-08-16 09:30:04 +08:00
GlobalData.py BaseTool: Add cache for the result of SkipAutogen. 2018-07-09 10:28:08 +08:00
Identification.py
LongFilePathOs.py BaseTools: Use absolute import in Common 2018-07-16 11:22:16 +08:00
LongFilePathOsPath.py BaseTools: Update Build tool to support multiple workspaces 2015-10-08 09:27:14 +00:00
LongFilePathSupport.py BaseTools/Ecc: Add a checkpoint for invalid UNI file. 2015-06-25 07:50:55 +00:00
Misc.py BaseTools: Use pickle to replace cPickle 2018-08-02 15:12:34 +08:00
MultipleWorkspace.py BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
Parsing.py BaseTools: Use absolute import in Common 2018-07-16 11:22:16 +08:00
PyUtility.pyd Sync BaseTool trunk (version r2599) into EDKII BaseTools. 2013-08-23 02:18:16 +00:00
RangeExpression.py BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
StringUtils.py BaseTools: Use absolute import in Common 2018-07-16 11:22:16 +08:00
TargetTxtClassObject.py BaseTools: Use absolute import in Common 2018-07-16 11:22:16 +08:00
ToolDefClassObject.py BaseTools: Use absolute import in Common 2018-07-16 11:22:16 +08:00
VariableAttributes.py BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
VpdInfoFile.py BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
__init__.py
caching.py BaseTools: AutoGen refactor ModuleAutoGen caching 2018-08-20 10:53:05 +08:00