mu_basecore icon indicating copy to clipboard operation
mu_basecore copied to clipboard

[Rebase & FF] 202405: BaseTools/WinRcPath: Improve Performance.

Open apop5 opened this issue 1 year ago • 2 comments

Description

WinRcPath generally takes about 2 seconds to run, due to calling multiple .bat files behind the scenes. This change reduces this time to ~0 seconds due to the following changes:

  1. It will attempt to load the path from the cache, which is located a $(WORKSPACE)/Conf/.rc_path. If the loading is a success and the rc_path still exists, it will use it.

  2. If the cache did not exist, or the path provided by the cache does not exist, it will find the rc path via the .bat files. If that succeeds, it will write the path to the cache.

Cherry-Pick and squash the following commits:

fe9fc525d9

  • [x] Impacts functionality?
    • Functionality - Does the change ultimately impact how firmware functions?
    • Examples: Add a new library, publish a new PPI, update an algorithm, ...
  • [ ] Impacts security?
    • Security - Does the change have a direct security impact on an application, flow, or firmware?
    • Examples: Crypto algorithm change, buffer overflow fix, parameter validation improvement, ...
  • [ ] Breaking change?
    • Breaking change - Will anyone consuming this change experience a break in build or boot behavior?
    • Examples: Add a new library class, move a module to a different repo, call a function in a new library class in a pre-existing module, ...
  • [ ] Includes tests?
    • Tests - Does the change include any explicit test code?
    • Examples: Unit tests, integration tests, robot tests, ...
  • [ ] Includes documentation?
    • Documentation - Does the change contain explicit documentation additions outside direct code modifications (and comments)?
    • Examples: Update readme file, add feature readme file, link to documentation on an a separate Web page, ...

How This Was Tested

  1. Confirmed the plugin will create a cache file on first run and use itin later runs
  2. Confirmed updating the path in the cache to a wrong value will invoke the typical means to find the cache and save the correct path into the cache.

Integration Instructions

N/A

apop5 avatar Jun 11 '24 17:06 apop5

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Please upload report for BASE (release/202405@e438f25). Learn more about missing BASE report.

Additional details and impacted files
@@                Coverage Diff                @@
##             release/202405     #903   +/-   ##
=================================================
  Coverage                  ?    1.33%           
=================================================
  Files                     ?     1433           
  Lines                     ?   359398           
  Branches                  ?     4581           
=================================================
  Hits                      ?     4792           
  Misses                    ?   354547           
  Partials                  ?       59           
Flag Coverage Δ
MdeModulePkg 0.32% <ø> (?)
MdePkg 5.41% <ø> (?)
NetworkPkg ∅ <ø> (?)
UefiCpuPkg 6.74% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov-commenter avatar Jun 26 '24 04:06 codecov-commenter

@apop5 you accidently added a step 3 in your PR description

Javagedes avatar Jun 26 '24 15:06 Javagedes