scripts: list_boards: add fast path for --board
flag
#96994
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
find_v2_boards()
if the board name is already known and avoid call torglob
. This change both reduces memory used and also IO activity on the file system.boards/native/native_sim/board.yml
is being extended, the folder path for the new variants should be the same, and notboards/native/native_sim_extend/board.yml
. In other words, the<board>
name should match.Comparison
On my machine I see the execution time drop from ~1.6 seconds to ~0.5 seconds. In my screenshots below 1.506 seconds drops to 0.556 seconds. When sysbuild is enabled, the time savings are doubled because this process is executed twice.
My machine uses AMD Ryzen 5800X3D, 32GB RAM and Windows 11 (26100.6584).
How to reproduce:
These are the simplest steps I could come up with
west update -o=--depth=1 --narrow
west build --pristine always -b custom_plank app --cmake -- --profiling-format=google-trace --profiling-output=cmake-configure-trace.json
cmake-configure-trace.json
in the UI