Hi, when generating a javascript binding for an interface, it is sometimes necessary to parse some another interfaces, namely its parents interfaces. Informations about the parents bindings may be needed multiple times. So we end end parsing several times the same interface. But caching the parsing result, we could speedup binding generations.
Sounds reasonable. Did you observe any performance issue caused by the redundant parsing? (I'm just curious about it because parent chains wouldn't be long in most cases.)
Created attachment 195414 [details] script used to benchmark binding generations (In reply to comment #1) > Sounds reasonable. > > Did you observe any performance issue caused by the redundant parsing? (I'm just curious about it because parent chains wouldn't be long in most cases.) I definitively see an improvement by caching the results. I used the attached script, launched from WebKitBuild/Release/ to benchmark generate-bindings.pl When running it on all the WebCore idls, it take me 3'40" for JavascriptCore and about 13' for V8 With caching, it takes me about 2'10" for both. (I ran the tests several times to avoid cold cache bias)
Great!
Created attachment 195416 [details] patch proposal
Comment on attachment 195416 [details] patch proposal Looks good. Feel free to set r?.
Comment on attachment 195416 [details] patch proposal Thanks!
Comment on attachment 195416 [details] patch proposal Clearing flags on attachment: 195416 Committed r147037: <http://trac.webkit.org/changeset/147037>
All reviewed patches have been landed. Closing bug.