Преглед изворни кода

[server] reset run counter so we don't compact like crazy

see https://github.com/vshaxe/vshaxe/issues/251
Simon Krajewski пре 7 година
родитељ
комит
cb04d49ea7
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      src/compiler/server.ml

+ 1 - 0
src/compiler/server.ml

@@ -498,6 +498,7 @@ let rec wait_loop process_params verbose accept =
 		(* prevent too much fragmentation by doing some compactions every X run *)
 		if !was_compilation then incr run_count;
 		if !run_count mod 10 = 0 then begin
+			run_count := 0;
 			let t0 = get_time() in
 			Gc.compact();
 			ServerMessage.gc_stats (get_time() -. t0);