Windows is just very very slow when dealing with lots of files. Video game developers have known this for decades which is why they always put game assets in some kind of archive.
I couldn't get convincing evidence of 7-zip being much faster. Here are my tests:
Objective
To measure the time it takes to install the rust-docs component with various tools.
Method
The following 4 tests were performed.
rustup
The following procedure is performed on a Windows installation with an out of date stable
toolchain previously installed with rustup. Process Monitor is installed. It is configured with the following filter: "Include if Process Name contains rustup". It is configured with "Drop filtered events". "Capture events" is enabled. The following command is executed in the command prompt: rustup update stable
. After completion, "Capture events" is disabled. The event log in Process Monitor is manually checked for the first and last event that have to do with the extraction of the rust-docs component. The data point is the time difference between those two events.
7-zip
The following procedure is performed on Windows. 7-zip is installed from https://www.7-zip.org/ . https://static.rust-lang.org/dist/rust-docs-1.30.0-x86_64-pc-windows-msvc.tar.xz is downloaded. The following batch script is executed:
echo %time%
7z x -so rust-docs-1.30.0-x86_64-pc-windows-msvc.tar.xz | 7z x -ttar -si
echo %time%
The data point is the time difference between the two printed times.
FastCopy
The following procedure is performed on Windows. FastCopy is installed from FastCopy . The files previously extracted with 7-zip are copied to a sibling directory. The data point is the “Total Time” reported by FastCopy.
tar
The following procedure is performed on Linux. https://static.rust-lang.org/dist/rust-docs-1.30.0-x86_64-pc-windows-msvc.tar.xz is downloaded. The following command is executed:
sync; time (tar xf rust-docs-1.30.0-x86_64-pc-windows-msvc.tar.xz; sync)
The data point is the “real” time reported by the time
command.
Setup
These tests were performed on the following system:
- Lenovo ThinkPad T470s
- Toshiba 500GB SSD
- Intel Core i7-7600U
- 20GB RAM
- OS 1
- Windows 10
- Filesystem: NTFS
- AV: Windows Defender
- OS 2
- Ubuntu 16.04
- Filesystem: ext4
Results
- rustup (Windows) 3m43s
- 7-zip (Windows) 2m35s
- FastCopy (Windows) 2m53s
- tar (Linux) <1½s
Conclusion
Rustup on Windows is not significantly slower than other Windows tools such as 7-zip and "the Fastest Copy/Backup Software on Windows" FastCopy. All Windows methods are at least 100× slower than the Linux method.
I actually like this idea. It would also fix the issues with the WebFonts not loading properly when viewed from a file://
URL. Note that tar
is not an appropriate archive format since it doesn't have an index.