Skip pre-warm — start listening immediately, render on demand
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2039,16 +2039,13 @@ let http_mode port =
|
||||
in
|
||||
|
||||
(* Pre-warm + cache all key pages *)
|
||||
let warmup_paths = ["/sx/"; "/sx/(geography)"; "/sx/(geography.(reactive.(examples)))";
|
||||
let _warmup_paths = ["/sx/"; "/sx/(geography)"; "/sx/(geography.(reactive.(examples)))";
|
||||
"/sx/(applications.(sxtp))"; "/sx/(geography.(cek))";
|
||||
"/sx/(language)"; "/sx/(applications)";
|
||||
"/sx/(geography.(reactive))"; "/sx/(geography.(hypermedia))";
|
||||
] in
|
||||
let wt0 = Unix.gettimeofday () in
|
||||
List.iter cache_response warmup_paths;
|
||||
let wt1 = Unix.gettimeofday () in
|
||||
Printf.eprintf "[sx-http] Pre-warmed + cached %d pages in %.3fs (%d cached)\n%!"
|
||||
(List.length warmup_paths) (wt1 -. wt0) (Hashtbl.length response_cache);
|
||||
ignore cache_response;
|
||||
Printf.eprintf "[sx-http] Skipping pre-warm (render on demand)\n%!";
|
||||
|
||||
(* Write full response to a socket *)
|
||||
let write_response client response =
|
||||
|
||||
Reference in New Issue
Block a user