Repository navigation
Speed up breeze UI asset change detection by skipping pnpm store - #72783
Merged
Merged
Conversation
breeze start-airflow hashes the UI directories before every start to decide whether the assets need rebuilding. The hash excluded node_modules but not .pnpm-store, and it listed and resolved every path under both before filtering. With a 763 MB store this added 16 to 30 seconds of "Still waiting" to every start with no changes. Pruning both directories during the walk brings the check down to well under a second.
Andrushika
requested review from
amoghrajesh,
ashb,
bugraoz93,
gopidesupavan,
jason810496,
jscheffl and
potiuk
as code owners
September 9, 2026 07:37
1 task done
ColtenOuO
approved these changes
Sep 9, 2026
ColtenOuO
left a comment
Contributor
There was a problem hiding this comment.
LGTM, Strong improvement!
Contributor
Backport successfully created: v3-3-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
jason810496
reviewed
Sep 9, 2026
jason810496
left a comment
Member
There was a problem hiding this comment.
#protm
It's a really nice improvement.
potiuk
pushed a commit
that referenced
this pull request
Sep 9, 2026
…72801) breeze start-airflow hashes the UI directories before every start to decide whether the assets need rebuilding. The hash excluded node_modules but not .pnpm-store, and it listed and resolved every path under both before filtering. With a 763 MB store this added 16 to 30 seconds of "Still waiting" to every start with no changes. Pruning both directories during the walk brings the check down to well under a second. (cherry picked from commit a29cd6c) Co-authored-by: Andrew Chang <[email protected]>
Member
+1,thanks for driving this improvement! |
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.
We can finally get rid of this!
Why
breeze start-airflowhashes the UI directories before every start to decide if the assets need a rebuild. The hash incompile_ui_assets.pyskipsnode_modulesbut not.pnpm-store, and it lists and resolves every path under both before filtering. With a 763 MB store this adds 16 to 30 seconds of "Still waiting" to every start, even with no changes.compile_provider_assets.pyalready skips.pnpm-store, this script missed it.What
Walk the directory with
os.walkand prunenode_modulesand.pnpm-storeat the directory level, so the hash never lists, resolves, or reads anything under them.Measured on my main checkout, hash check only:
airflow/uisimple/uiThat is about 700x optimization on the main UI.
In the old code, of the 21.5s, 12.2s was reading the 763 MB
.pnpm-storeinto sha256 and 6.7s wasresolve()on 173k paths that got filtered out right after. The full no-change run of thecompile-ui-assetshook drops from 16.4s to 0.3s on a worktree, and the 30 seconds of "Still waiting" on everybreeze start-airfloware gone.The hash order changes, so the first start after this lands rebuilds once. Added a subprocess test in the same style as
test_compile_ui_assets_dev.py, the.pnpm-storecase fails without the fix.The same
rglobpattern incompile_provider_assets.pycosts about 2s per provider. I plan to send that as a follow-up PR.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Fable 5.1) following the guidelines