Skip to content

Commit 9e50645

Browse files
committed
tweak
1 parent 94144e3 commit 9e50645

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

jscomp/bsb/bsb_db_encode.ml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ let nl buf =
4040
- not readable
4141
*)
4242

43-
let make_encoding length buf =
43+
let make_encoding length buf : Ext_buffer.t -> int -> unit =
4444
let max_range = length lsl 1 + 1 in
4545
if max_range <= 0xff then begin
4646
Ext_buffer.add_char buf '1';
@@ -90,7 +90,11 @@ let encode (dbs : Bsb_db.t) buf =
9090
Ext_array.iter dbs (fun x -> encode_single x buf) *)
9191

9292

93-
(* TODO: shall we avoid writing such file (checking the digest) *)
93+
(* shall we avoid writing such file (checking the digest)?
94+
It is expensive to start scanning the whole code base,
95+
we should we avoid it in the first place, if we do start scanning,
96+
this operation seems affordable
97+
*)
9498
let write_build_cache ~dir (bs_files : Bsb_db.t) : string =
9599
let oc = open_out_bin (Filename.concat dir bsbuild_cache) in
96100
let buf = Ext_buffer.create 100_000 in

0 commit comments

Comments
 (0)