We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ab4b58 commit b3e7eacCopy full SHA for b3e7eac
src/test/db_benchmark/multi_file_impl.ml
@@ -24,9 +24,9 @@ module Make () : Common.Database = struct
24
25
let set_block t ~block_num values =
26
let path = block_path t block_num in
27
- (* Concatenate all values and write in a single operation *)
28
- let concatenated = String.concat ~sep:"" values in
29
- Out_channel.write_all path ~data:concatenated
+ (* Write all values directly to file without in-memory concatenation *)
+ Out_channel.with_file path ~binary:true ~f:(fun oc ->
+ List.iter values ~f:(Out_channel.output_string oc) )
30
31
let get t ~key =
32
let block_num = block_of_key key in
0 commit comments