Changeset 147037 in webkit
- Timestamp:
- Mar 27, 2013 5:39:23 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r147034 r147037 1 2013-03-27 Arnaud Renevier <a.renevier@sisa.samsung.com> 2 3 cache parsed interfaces in CodeGenerator.pm 4 https://bugs.webkit.org/show_bug.cgi?id=113446 5 6 Reviewed by Kentaro Hara. 7 8 When generating binding for an interface, informations about parent 9 interfaces are sometimes needed several times. This patch caches 10 those the parsed interface. When generating all WebCore bindings, this 11 results in a speedup of about 40% for JavaScriptCore and about 80% for 12 V8. 13 14 No new tests: no change in behaviour. 15 16 * bindings/scripts/CodeGenerator.pm: 17 (ParseInterface): 18 1 19 2013-03-27 KyungTae Kim <ktf.kim@samsung.com> and Yongjun Zhang <yongjun_zhang@apple.com> 2 20 -
trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm
r142739 r147037 96 96 # Cache of IDL file pathnames. 97 97 my $idlFiles; 98 my $cachedInterfaces = {}; 98 99 99 100 # Default constructor … … 294 295 return undef if $interfaceName eq 'Object'; 295 296 297 if (exists $cachedInterfaces->{$interfaceName}) { 298 return $cachedInterfaces->{$interfaceName}; 299 } 300 296 301 # Step #1: Find the IDL file associated with 'interface' 297 302 my $filename = $object->IDLFileForInterface($interfaceName) … … 305 310 306 311 foreach my $interface (@{$document->interfaces}) { 307 return $interface if $interface->name eq $interfaceName; 312 if ($interface->name eq $interfaceName) { 313 $cachedInterfaces->{$interfaceName} = $interface; 314 return $interface; 315 } 308 316 } 309 317
Note: See TracChangeset
for help on using the changeset viewer.