RESOLVED FIXED 105540
CodeGen: Make [Reflect] use fastGetAttribute and fastHasAttribute
https://bugs.webkit.org/show_bug.cgi?id=105540
Summary CodeGen: Make [Reflect] use fastGetAttribute and fastHasAttribute
Erik Arvidsson
Reported 2012-12-20 08:43:37 PST
Currently the codegen generates code that use getAttribute and hasAttribute. We can use fastGetAttribute and fastHasAttribute when we use a non SVG animated attribute and not HTML::styleAttr. Performance results: With patch Master Bindings/id-getter runs/s 518.13 ± 2.85% 16.17% Better 446.03 ± 7.74% Dromaeo/dom-attr runs/s 141.68 ± 1.72% 20.81% Better 117.27 ± 1.47%
Attachments
Patch (4.41 KB, patch)
2012-12-20 08:47 PST, Erik Arvidsson
no flags
Patch (17.51 KB, patch)
2012-12-20 09:09 PST, Erik Arvidsson
no flags
Erik Arvidsson
Comment 1 2012-12-20 08:47:52 PST
Erik Arvidsson
Comment 2 2012-12-20 09:09:10 PST
Andreas Kling
Comment 3 2012-12-20 09:27:48 PST
Comment on attachment 180349 [details] Patch r=me, great idea! Maybe we could also use getIdAttribute()/getNameAttribute() for id/name to avoid iterating over the attribute list in case the attribute isn't present.
Erik Arvidsson
Comment 4 2012-12-20 09:33:03 PST
(In reply to comment #3) > (From update of attachment 180349 [details]) > r=me, great idea! > > Maybe we could also use getIdAttribute()/getNameAttribute() for id/name to avoid iterating over the attribute list in case the attribute isn't present. Good idea. I'll do that next. I was also considering introducing "fast" versions of the following: getURLAttribute getIntegralAttribute getUnsignedIntegralAttribute But the benefit might be less obvious since these do a lot of work compared to fastGetAttribute and fastHasAttribute.
WebKit Review Bot
Comment 5 2012-12-20 09:42:44 PST
Comment on attachment 180349 [details] Patch Clearing flags on attachment: 180349 Committed r138263: <http://trac.webkit.org/changeset/138263>
WebKit Review Bot
Comment 6 2012-12-20 09:42:47 PST
All reviewed patches have been landed. Closing bug.
Tony Chang
Comment 7 2012-12-20 10:51:03 PST
I think this is causing svg/custom/animate-reference-crash.html to hit an ASSERT on the debug bots: http://test-results.appspot.com/dashboards/flakiness_dashboard.html#showExpectations=true&tests=svg%2Fcustom%2Fanimate-reference-crash.html
Erik Arvidsson
Comment 8 2012-12-20 11:13:55 PST
Eric Seidel (no email)
Comment 9 2012-12-20 11:14:17 PST
Not surprising. That means that fastAttributeLookupAllowed is doing it's job, and we need to make the generator slightly smarter!
Erik Arvidsson
Comment 10 2012-12-20 11:27:15 PST
(In reply to comment #9) > Not surprising. That means that fastAttributeLookupAllowed is doing it's job, and we need to make the generator slightly smarter! Yup. The codegen only checks the type and className is a special case where the type is DOMString and not SVGAnimatedString. Maybe we should override it in SVGSVGElement.idl to use the correct type?
Erik Arvidsson
Comment 11 2012-12-20 11:47:08 PST
(In reply to comment #10) > (In reply to comment #9) > > Not surprising. That means that fastAttributeLookupAllowed is doing it's job, and we need to make the generator slightly smarter! > > Yup. The codegen only checks the type and className is a special case where the type is DOMString and not SVGAnimatedString. Maybe we should override it in SVGSVGElement.idl to use the correct type? Actually, SVGStylable.idl does override className. Now I'm not sure why we hit the assert.
Note You need to log in before you can comment on or make changes to this bug.