Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flutter_tools] cache more directories #112651

Merged
merged 7 commits into from Sep 30, 2022

Conversation

jonahwilliams
Copy link
Member

@jonahwilliams jonahwilliams commented Sep 29, 2022

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Sep 29, 2022
@jonahwilliams jonahwilliams changed the title [flutter_tools] cache more directories [flutter_tools] cache more directories, use approximate basename Sep 29, 2022
@jonahwilliams jonahwilliams marked this pull request as ready for review September 29, 2022 17:51

// .basename is surprisingly slow as it hits the real file system to ask for the
// current directory.
String _approximateBasename(FileSystemEntity entity, FileSystem fileSystem) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This was a large part of the performance fix. Even though we cache the Path context on our error handling filesystem, at this point entity.fileSystem returns localFileSystem instead of ErrorHandlingFIleSystem.

@jonahwilliams jonahwilliams changed the title [flutter_tools] cache more directories, use approximate basename [flutter_tools] cache more directories, use basename function from FileSystem instead of FileSystemEntity Sep 29, 2022
@andrewkolos
Copy link
Contributor

With #112673, is the workaround for using the right filesystem object no longer necessary?

@jonahwilliams
Copy link
Member Author

Correct, I'll remove that part

@jonahwilliams jonahwilliams changed the title [flutter_tools] cache more directories, use basename function from FileSystem instead of FileSystemEntity [flutter_tools] cache more directories Sep 30, 2022
Copy link
Contributor

@andrewkolos andrewkolos left a comment

Choose a reason for hiding this comment

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

LGTM

@andrewkolos andrewkolos added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 30, 2022
@auto-submit auto-submit bot merged commit 99fb2d3 into flutter:master Sep 30, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 30, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Sep 30, 2022
jonahwilliams added a commit that referenced this pull request Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants