Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 534021965f6f7c417610add53984f39d6945bbcf
      
https://github.com/tianocore/edk2/commit/534021965f6f7c417610add53984f39d6945bbcf
  Author: Zhi Jin <[email protected]>
  Date:   2023-12-01 (Fri, 01 Dec 2023)

  Changed paths:
    M MdeModulePkg/Core/Dxe/Hand/Handle.c

  Log Message:
  -----------
  MdeModulePkg: Optimize CoreInstallMultipleProtocolInterfaces

CoreLocateDevicePath is used in CoreInstallMultipleProtocolInterfaces to
check if a Device Path Protocol instance with the same device path is
alreay installed.
CoreLocateDevicePath is a generic API, and would introduce some
unnecessary overhead for such usage.

The optimization is:
1. Implement IsDevicePathInstalled to loop all the Device Path
   Protocols installed and check if any of them matchs the given device
   path.
2. Replace CoreLocateDevicePath with IsDevicePathInstalled in
   CoreInstallMultipleProtocolInterfaces.

This optimization could save several seconds in PCI enumeration on a
system with many PCI devices.

Cc: Jian J Wang <[email protected]>
Cc: Liming Gao <[email protected]>
Cc: Dandan Bi <[email protected]>
Cc: Ray Ni <[email protected]>
Signed-off-by: Zhi Jin <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Reviewed-by: Liming Gao <[email protected]>




_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to