Skip to content

Fix calling pathBasename twice during loadOrderSort #11115

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

Merged
merged 1 commit into from
Jul 8, 2020

Conversation

zodern
Copy link
Collaborator

@zodern zodern commented Jul 8, 2020

For a medium sized app on Windows, these are some times from sorting files in 3 architectures during full rebuilds:
Before: 153ms, 140, 358, 391, 219, 177

After removing duplicate files.pathBasename: 84ms, 58, 73, 49, 114, 88

In the future, an additional optimization we could consider is using path.posix.basename instead of files.pathBasename. files.pathBasename converts paths to the os style path, then uses the basename function for the os. This conversion is probably unnecessary since all paths should be in posix format and are relative.

With posix basename: 57ms, 38, 25, 30, 40, 70, 43

@filipenevola filipenevola added this to the Release 1.10.3 milestone Jul 8, 2020
@filipenevola filipenevola changed the base branch from devel to release-1.10.3 July 8, 2020 21:50
@filipenevola filipenevola merged commit d2998d6 into release-1.10.3 Jul 8, 2020
@filipenevola filipenevola deleted the faster-load-order-sort branch July 8, 2020 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants