diff --git a/rustdoc/game/pregame/built_info/constant.BUILT_TIME_UTC.html b/rustdoc/game/pregame/built_info/constant.BUILT_TIME_UTC.html index ad91abe825..d644f0dbd5 100644 --- a/rustdoc/game/pregame/built_info/constant.BUILT_TIME_UTC.html +++ b/rustdoc/game/pregame/built_info/constant.BUILT_TIME_UTC.html @@ -1,6 +1,6 @@ game::pregame::built_info::BUILT_TIME_UTC - Rust

Constant game::pregame::built_info::BUILT_TIME_UTC[][src]

pub const BUILT_TIME_UTC: &str = "Tue, 11 May 2021 18:04:25 +0000";

The built-time in RFC2822, UTC

+ Change settings

Constant game::pregame::built_info::BUILT_TIME_UTC[][src]

pub const BUILT_TIME_UTC: &str = "Tue, 11 May 2021 18:49:35 +0000";

The built-time in RFC2822, UTC

\ 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` pub const RUSTDOC_VERSION: &str = "rustdoc 1.52.1 (9bc8c42bb 2021-05-09)"; /// The built-time in RFC2822, UTC -pub const BUILT_TIME_UTC: &str = "Tue, 11 May 2021 18:04:25 +0000"; +pub const BUILT_TIME_UTC: &str = "Tue, 11 May 2021 18:49:35 +0000"; /// The target architecture, given by `cfg!(target_arch)`. pub const CFG_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 @@ 434 435 436 +437 +438
 use std::collections::{BTreeMap, BTreeSet};
 use std::fs::File;
@@ -746,22 +748,24 @@
         Parallelism::Fastest,
         paths,
         |(orig_path, path)| {
-            let uncompressed_size_bytes = std::fs::metadata(&orig_path).unwrap().len();
-            // Always calculate the md5sum for files under 1GB.
-            let checksum = if uncompressed_size_bytes < 1024 * 1024 * 1024 {
-                md5sum(&orig_path)
-            } else if truth
-                .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.
+            let metadata = std::fs::metadata(&orig_path).unwrap();
+            let uncompressed_size_bytes = metadata.len();
+            let recent_modtime = metadata.modified().unwrap().elapsed().unwrap()
+                < std::time::Duration::from_secs(60 * 60 * 3);
+
+            let checksum = if recent_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
 
 

Function updater::compress[][src]

pub(crate) fn compress(path: &str, remote_path: &str)
+ Change settings

Function updater::compress[][src]

pub(crate) fn compress(path: &str, remote_path: &str)
\ 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

Function updater::download_file[][src]

pub(crate) async fn download_file(version: &str, path: &str) -> Result<Vec<u8>>
+ Change settings

Function updater::download_file[][src]

pub(crate) async fn download_file(version: &str, path: &str) -> Result<Vec<u8>>
\ 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

Function updater::generate_manifest[][src]

pub(crate) fn generate_manifest(truth: &Manifest) -> Manifest
+ Change settings

Function updater::generate_manifest[][src]

pub(crate) fn generate_manifest(truth: &Manifest) -> Manifest
\ 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

Function updater::md5sum[][src]

pub(crate) fn md5sum(path: &str) -> String
+ Change settings

Function updater::md5sum[][src]

pub(crate) fn md5sum(path: &str) -> String
\ 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

Function updater::remove_empty_directories[][src]

pub(crate) fn remove_empty_directories(root: &str)
+ Change settings

Function updater::remove_empty_directories[][src]

pub(crate) fn remove_empty_directories(root: &str)
\ 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

Function updater::rm[][src]

pub(crate) fn rm(path: &str)
+ Change settings

Function updater::rm[][src]

pub(crate) fn rm(path: &str)
\ 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

Crate updater[][src]

Constants

+ Change settings

Crate updater[][src]

Constants

MD5_BUF_READ_SIZE

Functions

compress
download_file
download_updates
generate_manifest
incremental_upload
just_compare
main
md5sum
opt_into_all
remove_empty_directories
rm
upload
\ No newline at end of file