RESOLVED FIXED113446
cache parsed interfaces in CodeGenerator.pm
https://bugs.webkit.org/show_bug.cgi?id=113446
Summary cache parsed interfaces in CodeGenerator.pm
arno.
Reported 2013-03-27 14:52:37 PDT
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.
Attachments
script used to benchmark binding generations (1.66 KB, application/x-shellscript)
2013-03-27 15:31 PDT, arno.
no flags
patch proposal (2.50 KB, patch)
2013-03-27 15:35 PDT, arno.
no flags
Kentaro Hara
Comment 1 2013-03-27 14:55:45 PDT
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.)
arno.
Comment 2 2013-03-27 15:31:49 PDT
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)
Kentaro Hara
Comment 3 2013-03-27 15:32:33 PDT
Great!
arno.
Comment 4 2013-03-27 15:35:57 PDT
Created attachment 195416 [details] patch proposal
Kentaro Hara
Comment 5 2013-03-27 15:53:32 PDT
Comment on attachment 195416 [details] patch proposal Looks good. Feel free to set r?.
Kentaro Hara
Comment 6 2013-03-27 15:55:31 PDT
Comment on attachment 195416 [details] patch proposal Thanks!
WebKit Review Bot
Comment 7 2013-03-27 17:37:38 PDT
Comment on attachment 195416 [details] patch proposal Clearing flags on attachment: 195416 Committed r147037: <http://trac.webkit.org/changeset/147037>
WebKit Review Bot
Comment 8 2013-03-27 17:37:41 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.