mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
[PR #74] [MERGED] Avoid opening all files for reading on windows #289
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/bootandy/dust/pull/74
Author: @rasmushalland
Created: 2/24/2020
Status: ✅ Merged
Merged: 3/1/2020
Merged by: @bootandy
Base:
master← Head:win-perf📝 Commits (3)
c30f31cAvoid opening all files for reading on windows2c58041Clean up windows performanceefb455cOpening files on windows got a lot cheaper.📊 Changes
2 files changed (+148 additions, -42 deletions)
View changed files
📝
src/utils/mod.rs(+50 -30)📝
src/utils/platform.rs(+98 -12)📄 Description
It can be very expensive to do that, especially when it causes windows defender to read the files and scan them.
Savings in orders of magnitude in terms of time, io and cpu have been observed on hdd, windows 10, some 100Ks files taking up some hundreds of GBs:
Consistently opening the file: 30 minutes.
With this optimization: 8 sec.
Hard links: Unresolved. We don't get inode/file index, so hard links count once for each link. Hopefully they are not too commonly in use on windows.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.