From 501934f9c6f0bca90b990f4e62c9033215c38e00 Mon Sep 17 00:00:00 2001 From: giles Date: Sun, 29 Mar 2026 22:49:08 +0000 Subject: [PATCH] =?UTF-8?q?Skip=20pre-warm=20=E2=80=94=20start=20listening?= =?UTF-8?q?=20immediately,=20render=20on=20demand?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- hosts/ocaml/bin/sx_server.ml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hosts/ocaml/bin/sx_server.ml b/hosts/ocaml/bin/sx_server.ml index b954acaa..93f6aff2 100644 --- a/hosts/ocaml/bin/sx_server.ml +++ b/hosts/ocaml/bin/sx_server.ml @@ -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 =