fix(watch): drop the digest memo between rounds

This commit is contained in:
milner committed 2022-08-17 19:24:25 +00:00
1 parent 3e3d55074d
commit 273645805a
2 files changed
+5

No files matched your search

+1
View File
@@ -535,6 +535,7 @@ let cmd_compdb () =
let cmd_watch names = let cmd_watch names =
let round () = let round () =
Cache.reset ();
let p = configure () in let p = configure () in
with_config_header p; with_config_header p;
let t0 = Unix.gettimeofday () in let t0 = Unix.gettimeofday () in
+4
View File
@@ -36,6 +36,10 @@ let digest_file p =
let forget p = Hashtbl.remove digests p let forget p = Hashtbl.remove digests p
(* The memo saves re-hashing a header that half the project includes, so it is
only ever valid for one build. A watch loop runs many in one process. *)
let reset () = Hashtbl.reset digests
let key ~cmd ~inputs = let key ~cmd ~inputs =
let b = Buffer.create 256 in let b = Buffer.create 256 in
Buffer.add_string b cmd; Buffer.add_string b cmd;