camlspotter / ocamloscope.2

OCamlOScope 2 : OCaml API search
42 stars 1 forks source link

Too slow scraping of `dom_html.cmi` #24

Closed camlspotter closed 7 years ago

camlspotter commented 7 years ago
Scraping .../js_of_ocaml\dom_html.cmi...
Actual scraping... (this may take long time.)
Got 734 items
Actual scrape done in 619.47 secs

619.47 secs / 734 items, this is ridiculous.

camlspotter commented 7 years ago

Hmm. Globalize took 99% time of this. This calls Outcometree printers many times... Possible trials are:

Not sure the latter is effective, since we need to use a pointer equality cache.

camlspotter commented 7 years ago

Added memoization to Rewrite.rwrite then it went to just 5.06 secs from 619.47 :-) I guess it was due to the file system accesses of Ident.persistent id = true case.

camlspotter commented 7 years ago
commit f33e56244e8cfbd3c50cec51d9aac132e8d609ab
Author: Jun FURUSE <jun.furuse@sc.com>
Date:   Fri Nov 18 18:09:52 2016 +0800

    Fixed very slow cmi scraping of js_of_ocaml/../dom_html.cmi, by introducing a simple memoization
camlspotter commented 7 years ago

No any other serious slow down is not observed so far.