audk/MdeModulePkg/Core/Dxe/Hand
Xiaoqiang Zhang 0596e5fa05 MdeModulePkg: CoreValidateHandle Optimization
REF : https://bugzilla.tianocore.org/show_bug.cgi?id=4817

Before entering BIOS setup, CoreValidateHandle function executed
over 600,000 times during BDS phase on latest 8S server platform.
In CoreValidateHandle function, current implementation will go
through the doubly-linked list handle database in each call, and
this will have big impact on boot performance.
The optimization is using Red-black tree to store the EFI handle
address when insert each EFI handle into the handle database, and
remove the handle from Red-black tree if the handle is removed
from the handle database. CoreValidateHandle function changed to
go through the Red-black tree.
After verification on latest 8S server platform, BDS boot time can
save 20s+ after this change.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Andrew Fish <afish@apple.com>
Tested-by: Xiaoqiang Zhang <xiaoqiang.zhang@intel.com>
2024-08-30 11:42:41 +00:00
..
DriverSupport.c MdeModulePkg: Optimize CoreConnectSingleController 2024-02-06 17:54:53 +00:00
Handle.c MdeModulePkg: CoreValidateHandle Optimization 2024-08-30 11:42:41 +00:00
Handle.h MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Locate.c MdeModulePkg: Fix memory leak in LocateHandleBuffer() 2023-08-31 19:35:19 +00:00
Notify.c MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00