Skip to content

[flutter_tools] make gallery hot reload 5x faster with one neat trick - #56224

Merged
jonahwilliams merged 1 commit into
flutter:masterfrom
jonahwilliams:fix_wildcard_diff
May 4, 2020
Merged

jonahwilliams merged 1 commit into
flutter:masterfrom
jonahwilliams:fix_wildcard_diff

Conversation

@jonahwilliams

Copy link
Copy Markdown
Contributor

Description

The AssetBundle tracks whether any changes to wildcard directories necessitate rebuilding the asset bundle. Rebuilding should be avoid since it can be quite expensive even if the assets haven't changed.

However there was a bug! We (I) tracked the wrong directory for dependent packages, meaning everytime we checked if the asset bundle needed to be built, we saw a "newly missing" wildcard and said yes.

These don't even need to be tracked!

@jonahwilliams

Copy link
Copy Markdown
Contributor Author

NVM, i misread the code, we waited forever lol. I wonder if instead we should wait for isolate runnable?

@jonahwilliams

Copy link
Copy Markdown
Contributor Author

Commented on the wrong issue.

@christopherfujino christopherfujino left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@jonahwilliams
jonahwilliams merged commit 6d1966e into flutter:master May 4, 2020
@jonahwilliams
jonahwilliams deleted the fix_wildcard_diff branch May 4, 2020 18:32
@jonahwilliams

Copy link
Copy Markdown
Contributor Author

FYI @willlarche hot reload in the gallery app should be noticeably faster now.

@willlarche

Copy link
Copy Markdown
Contributor

How'd you find this one?

@jonahwilliams

Copy link
Copy Markdown
Contributor Author

I just was running the gallery to debug the service worker issues and I noticed it was taking way too long

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants