\ No newline at end of file
diff --git a/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-8fd4d727846ff3e4/out/built.rs.html b/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-8fd4d727846ff3e4/out/built.rs.html
index 4015423a3e..afc6175603 100644
--- a/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-8fd4d727846ff3e4/out/built.rs.html
+++ b/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-8fd4d727846ff3e4/out/built.rs.html
@@ -122,7 +122,7 @@
/// The output of `rustdoc -V`pubconstRUSTDOC_VERSION: &str="rustdoc 1.52.1 (9bc8c42bb 2021-05-09)";
/// The built-time in RFC2822, UTC
-pubconstBUILT_TIME_UTC: &str="Tue, 11 May 2021 18:04:25 +0000";
+pubconstBUILT_TIME_UTC: &str="Tue, 11 May 2021 18:49:35 +0000";
/// The target architecture, given by `cfg!(target_arch)`.pubconstCFG_TARGET_ARCH: &str="x86_64";
/// The endianness, given by `cfg!(target_endian)`.
diff --git a/rustdoc/src/updater/main.rs.html b/rustdoc/src/updater/main.rs.html
index a182b7428b..3d5315cbb9 100644
--- a/rustdoc/src/updater/main.rs.html
+++ b/rustdoc/src/updater/main.rs.html
@@ -437,6 +437,8 @@
434435436
+437
+438
usestd::collections::{BTreeMap, BTreeSet};
usestd::fs::File;
@@ -746,22 +748,24 @@
Parallelism::Fastest,
paths,
|(orig_path, path)| {
- letuncompressed_size_bytes=std::fs::metadata(&orig_path).unwrap().len();
- // Always calculate the md5sum for files under 1GB.
- letchecksum=ifuncompressed_size_bytes<1024*1024*1024 {
- md5sum(&orig_path)
- } elseiftruth
- .entries
- .get(&path)
- .map(|entry|entry.uncompressed_size_bytes==uncompressed_size_bytes)
- .unwrap_or(false)
+ // If the file's modtime is newer than 3 hours or the uncompressed size has changed,
+ // calculate md5sum. Otherwise assume no change. This heuristic saves lots of time and
+ // doesn't stress my poor SSD as much.
+ letmetadata=std::fs::metadata(&orig_path).unwrap();
+ letuncompressed_size_bytes=metadata.len();
+ letrecent_modtime=metadata.modified().unwrap().elapsed().unwrap()
+ <std::time::Duration::from_secs(60*60*3);
+
+ letchecksum=ifrecent_modtime
+ ||truth
+ .entries
+ .get(&path)
+ .map(|entry|entry.uncompressed_size_bytes!=uncompressed_size_bytes)
+ .unwrap_or(true)
{
- // For files larger than 1GB, don't recalculate the md5sum if the size hasn't
- // changed. This saves substantial time for a few gigantic files in data/input that
- // rarely change.
- truth.entries[&path].checksum.clone()
- } else {
md5sum(&orig_path)
+ } else {
+ truth.entries[&path].checksum.clone()
};
(
path,
diff --git a/rustdoc/updater/fn.compress.html b/rustdoc/updater/fn.compress.html
index 8a4f175636..543a204deb 100644
--- a/rustdoc/updater/fn.compress.html
+++ b/rustdoc/updater/fn.compress.html
@@ -1,5 +1,5 @@
updater::compress - Rust
\ No newline at end of file
diff --git a/rustdoc/updater/fn.download_file.html b/rustdoc/updater/fn.download_file.html
index 002a8e8ee5..900fc8c2a3 100644
--- a/rustdoc/updater/fn.download_file.html
+++ b/rustdoc/updater/fn.download_file.html
@@ -1,5 +1,5 @@
updater::download_file - Rust
\ No newline at end of file
diff --git a/rustdoc/updater/fn.generate_manifest.html b/rustdoc/updater/fn.generate_manifest.html
index aacbf290f3..c5e2f46e42 100644
--- a/rustdoc/updater/fn.generate_manifest.html
+++ b/rustdoc/updater/fn.generate_manifest.html
@@ -1,5 +1,5 @@
updater::generate_manifest - Rust
\ No newline at end of file
diff --git a/rustdoc/updater/fn.md5sum.html b/rustdoc/updater/fn.md5sum.html
index d476527201..f6598b77e9 100644
--- a/rustdoc/updater/fn.md5sum.html
+++ b/rustdoc/updater/fn.md5sum.html
@@ -1,5 +1,5 @@
updater::md5sum - Rust
\ No newline at end of file
diff --git a/rustdoc/updater/fn.remove_empty_directories.html b/rustdoc/updater/fn.remove_empty_directories.html
index b8deaa27dc..b6b216b0e7 100644
--- a/rustdoc/updater/fn.remove_empty_directories.html
+++ b/rustdoc/updater/fn.remove_empty_directories.html
@@ -1,5 +1,5 @@
updater::remove_empty_directories - Rust
\ No newline at end of file
diff --git a/rustdoc/updater/fn.rm.html b/rustdoc/updater/fn.rm.html
index 53dfc5afd9..d4723fcbb1 100644
--- a/rustdoc/updater/fn.rm.html
+++ b/rustdoc/updater/fn.rm.html
@@ -1,5 +1,5 @@
updater::rm - Rust
\ No newline at end of file
diff --git a/rustdoc/updater/index.html b/rustdoc/updater/index.html
index 0c6be49356..25bd28bc11 100644
--- a/rustdoc/updater/index.html
+++ b/rustdoc/updater/index.html
@@ -1,7 +1,7 @@
updater - Rust