X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2Ftree.ml;h=b7b856641c9075a97e19c5f82bbbc79b31d08c85;hb=7e27afe6fa006ad355237ccc0695c6493ea57929;hp=0c62ec741bfb4bbf1f0da6e6ed991feeee353430;hpb=13a15353a161600575ff4b70eda2c7a0f024d969;p=SXSI%2Fxpathcomp.git diff --git a/src/tree.ml b/src/tree.ml index 0c62ec7..b7b8566 100644 --- a/src/tree.ml +++ b/src/tree.ml @@ -125,7 +125,8 @@ struct close_tag build ""; LOG ( __ "parsing" 2 "%s\n" "Finished parsing"); LOG ( __ "indexing" 2 "%s\n" "Starting index construction"); - let r = close_document build in + let r = close_document build + in LOG ( __ "indexing" 2 "%s\n" "Finished index construction"); r in @@ -146,7 +147,7 @@ struct let in_chan = open_in file in let buffer = String.create 4096 in let parser_, finalizer = create_parser () in - let () = + let parse () = try while true do let read = input in_chan buffer 0 4096 in @@ -158,7 +159,8 @@ struct | End_of_file -> close_in in_chan | e -> raise e in - finalizer () + Utils.time ~msg:"Parsing XML file" parse (); + Utils.time ~msg:"Creating tree and text-collection index" finalizer () end @@ -543,7 +545,7 @@ let node_of_t t = LOG ( __ "indexing" 2 "%s\n" "Initializing tag structure"); let _ = Tag.init (mk_tag_ops t) in LOG ( __ "indexing" 2 "%s\n" "Starting tag table construction"); - let f, n, c, d = time collect_labels t ~msg:"Building tag relationship table" in + let f, n, c, d = Utils.time ~msg:"Building tag relationship table" collect_labels t in let c = Array.map TagS.to_ptset c in let n = Array.map TagS.to_ptset n in let f = Array.map TagS.to_ptset f in