1. camlspotter
  2. mutated_ocaml


j...@vmware  committed 3358f94

caching was inefficient

  • Participants
  • Parent commits 500a2ba
  • Branches default

Comments (0)

Files changed (1)

File typing/spot.ml

View file
  • Ignore whitespace
   let record loc t = 
     if !Clflags.annotations then begin
+(* This caching works horribly when too many things are defined 
+   at the same locations. For example, a type definition of more than 
+   3000 variants, with sexp camlp4 extension, the compile time explodes
+   from 10secs to 4mins
       if List.exists (equal t) (Hashtbl.find_all recorded loc) then ()
       else Hashtbl.add recorded loc t
+      Hashtbl.add recorded loc t
   let recorded () = Hashtbl.fold (fun k v st -> (k,v)::st) recorded []