rust-lang / rustwide

Execute your code on the Rust ecosystem.
Apache License 2.0
180 stars 41 forks source link

Add the Workspace::purge_all_caches method #26

Closed pietroalbini closed 4 years ago

pietroalbini commented 4 years ago

This PR adds a method to purge the contents of all the caches, with the goal of freeing up disk space.

pietroalbini commented 4 years ago

@Nemo157 fixed the check detecting index updates.

In the meantime I also changed the way changes are found: comparing the SHAs took a huge amount of time (around 40 seconds on my NVMe), slowing down running cargo test a lot. Since we only care about sizes not increasing when purging the caches, the check now compares file sizes instead of file contents.

Nemo157 commented 4 years ago

If you applied the should_ignore as a filter_entry during the walkdir then you could avoid collecting details on those files (given that the index is likely to be the major component this would save a lot of time).

pietroalbini commented 4 years ago

@Nemo157 good catch! Done.