cmake: snippets: skip snippets.py when SNIPPET is unset#103709
Draft
gudnimg wants to merge 1 commit intozephyrproject-rtos:mainfrom
Draft
cmake: snippets: skip snippets.py when SNIPPET is unset#103709gudnimg wants to merge 1 commit intozephyrproject-rtos:mainfrom
gudnimg wants to merge 1 commit intozephyrproject-rtos:mainfrom
Conversation
When SNIPPET is not set, no snippets are applied but snippets.py still runs Skip invoking it to avoid Python import overhead (~140 ms on my end). Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
1e79e81 to
f1a1343
Compare
|
pdgendt
approved these changes
Feb 8, 2026
nordicjm
requested changes
Feb 9, 2026
Contributor
nordicjm
left a comment
There was a problem hiding this comment.
Same comment as in #103718 (review)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



When SNIPPET is not set, no snippets are applied but snippets.py still runs. Skip invoking it to avoid Python import overhead (~140 ms on my end).
Just an idea to speed up build configuration time. My understanding is that if
SNIPPETis not defined, then no snippets are required for the build. https://docs.zephyrproject.org/latest/build/snippets/using.htmlTested using:
west build --pristine always --board nrf52dk/nrf52832 samples/basic/blinky --cmake -- --profiling-format=google-trace --profiling-output=cmake-configure-trace.jsonBefore (141.6ms):
After(1.1ms):