From 798e85cb6d55d80d988f91e6289e4041e95ad2e4 Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Fri, 1 Jun 2007 13:20:21 +0000 Subject: [PATCH] I do not know why, but (Helm_registry.get_list Helm_registry.string "matita.includes") is extremely slow! Removing it from the inner loop really improves performances! --- helm/software/matita/matitaWiki.ml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/helm/software/matita/matitaWiki.ml b/helm/software/matita/matitaWiki.ml index b8eb18b46..c7c5e8838 100644 --- a/helm/software/matita/matitaWiki.ml +++ b/helm/software/matita/matitaWiki.ml @@ -124,6 +124,10 @@ let outer_syntax_parser () = with Failure _ -> assert false ;; + +let include_paths = + lazy (Helm_registry.get_list Helm_registry.string "matita.includes") +;; let rec interactive_loop () = (* every loop is terminated by a terminator both on stdout and stderr *) @@ -166,13 +170,10 @@ let rec interactive_loop () = (List.find (fun (j,_,_) -> j=i) metasenv) ) open_goals)) | _ -> () - in - let include_paths = - Helm_registry.get_list Helm_registry.string "matita.includes" in run_script str (MatitaEngine.eval_from_stream ~first_statement_only:true ~prompt:false - ~include_paths ~watch_statuses) ; + ~include_paths:(Lazy.force include_paths) ~watch_statuses) ; interactive_loop (Some (List.length !lexicon_status)) with | GrafiteEngine.Macro (floc,_) -> -- 2.39.2