File tree Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -1106,18 +1106,11 @@ module DB = struct
11061106 && Package.Name.Set. equal t.system_provided system_provided
11071107 ;;
11081108
1109- let hash { all; system_provided } =
1110- let hash_all =
1111- Package.Name.Map. foldi all ~init: 0 ~f: (fun key value running_hash ->
1112- Tuple.T3. hash
1113- Package.Name. hash
1114- Lock_dir.Pkg. hash
1115- Int. hash
1116- (key, value, running_hash))
1117- in
1118- Package.Name.Set. fold system_provided ~init: hash_all ~f: (fun name running_hash ->
1119- Tuple.T2. hash Package.Name. hash Int. hash (name, running_hash))
1120- ;;
1109+ let hash = `Do_not_hash
1110+ let _ = hash
1111+ (* Because t is large, hashing is expensive, so much so that hashing the db in Input.t
1112+ below slowed down the dune call in the test repo described in #12248 from 1s to
1113+ 2s. *)
11211114
11221115 let get =
11231116 let memo =
@@ -1160,7 +1153,8 @@ end = struct
11601153 ;;
11611154
11621155 let hash { db; package; universe } =
1163- Tuple.T3. hash DB. hash Package.Name. hash Package_universe. hash (db, package, universe)
1156+ let _ = db in
1157+ Tuple.T2. hash Package.Name. hash Package_universe. hash (package, universe)
11641158 ;;
11651159
11661160 let to_dyn = Dyn. opaque
You can’t perform that action at this time.
0 commit comments