Open
Bug 1374011
Opened 7 years ago
Updated 3 months ago
substring shows up in Preact profiles
Categories
(Core :: JavaScript Engine, defect, P3)
Core
JavaScript Engine
Tracking
()
NEW
Performance Impact | low |
People
(Reporter: ehsan.akhgari, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
(Keywords: perf, Whiteboard: [sp3])
Attachments
(1 file)
190 bytes,
text/html
|
Details |
Profile: http://bit.ly/2sKUasZ Test case: http://speedometer2.benj.me/InteractiveRunner.html?suite=Preact-TodoMVC The time spent here is under Adding100Items. It's not that much but perhaps something to look into. This is the code where the call comes from: function y(e, t, n, o, r) { if ("className" === t && (t = "class"), "class" === t && o && "object" === (void 0 === o ? "undefined" : fe(o)) && (o = a(o)), "key" === t); else if ("class" !== t || r) if ("style" === t) { if ((!o || l(o) || l(n)) && (e.style.cssText = o || ""), o && "object" === (void 0 === o ? "undefined" : fe(o))) { if (!l(n)) for (var s in n) s in o || (e.style[s] = ""); for (var c in o) e.style[c] = "number" != typeof o[c] || se[c] ? o[c] : o[c] + "px" } } else if ("dangerouslySetInnerHTML" === t) e.innerHTML = o && o.__html || ""; else if ("o" == t[0] && "n" == t[1]) { var u = e._listeners || (e._listeners = {}); t = $(t.substring(2)), o ? u[t] || e.addEventListener(t, g, !!ce[t]) : u[t] && e.removeEventListener(t, g, !!ce[t]), u[t] = o } else if ("list" !== t && "type" !== t && !r && t in e) b(e, t, null == o ? "" : o), null != o && o !== !1 || e.removeAttribute(t); else { var f = r && t.match(/^xlink\:?(.+)/); null == o || o === !1 ? f ? e.removeAttributeNS("http://www.w3.org/1999/xlink", $(f[1])) : e.removeAttribute(t) : "object" === (void 0 === o ? "undefined" : fe(o)) || i(o) || (f ? e.setAttributeNS("http://www.w3.org/1999/xlink", $(f[1]), o) : e.setAttribute(t, o)) } else e.className = o || "" } On this reduced test case (I didn't bother looking up the name of the actual event handlers that flow through this code), Nightly gets ~3700 on my machine, Chrome unstable gets ~2800.
Comment 1•7 years ago
|
||
The self-hosted "Substring()" function also shows up in the Speedometer Backbone benchmark, where we inline it 1522 times. That function just does some basic Int32 coercion and calls SubstringKernel(), which we already know how to inline. At least for that case, it would be good to teach Ion how to inline Substring() directly as a Native.
Updated•7 years ago
|
Whiteboard: [qf:p3]
Comment 2•7 years ago
|
||
It seems we could kill Substring completely and do the coercion in SubstringKernel.
Updated•7 years ago
|
Priority: -- → P3
Updated•2 years ago
|
Performance Impact: --- → P3
Whiteboard: [qf:p3]
Updated•2 years ago
|
Severity: normal → S3
Updated•1 year ago
|
Updated•1 year ago
|
Whiteboard: [sp3]
Updated•1 year ago
|
See Also: → https://mozilla-hub.atlassian.net/browse/SP3-125
You need to log in
before you can comment on or make changes to this bug.
Description
•