Page MenuHomePhabricator

~200ms spent on CSSStyleDeclaration.getPropertyValue() due to jQuery hide()/show()
Closed, ResolvedPublic8 Estimated Story Points

Description

About 200ms of VE's load time is spent in CSSStyleDeclaration.getPropertyValue(). It appears that most of the callers are checking the hidden state of elements, which happens whenever you toggle visibility with $.hide. Optimizing that away looks like an easy win.

Screen_Shot_2015-01-18_at_18.40.47.png (646×1 px, 177 KB)

Event Timeline

ori raised the priority of this task from to Needs Triage.
ori updated the task description. (Show Details)
ori added subscribers: ori, Catrope, Krinkle.
ori set Security to None.
Jdforrester-WMF triaged this task as Unbreak Now! priority.Jan 20 2015, 8:07 PM
Jdforrester-WMF moved this task from To Triage to Bug Fixes on the VisualEditor board.
gerritbot added a subscriber: gerritbot.

Change 186524 had a related patch set uploaded (by Catrope):
Don't use .hide() in ve.ui.Context constructor

https://gerrit.wikimedia.org/r/186524

Patch-For-Review

Change 186527 had a related patch set uploaded (by Catrope):
Re-implement ve.ce.ResizableNode#showHandles using CSS

https://gerrit.wikimedia.org/r/186527

Patch-For-Review

Change 186528 had a related patch set uploaded (by Catrope):
ce.MWReferencesListNode: Remove unnecessary .show() call

https://gerrit.wikimedia.org/r/186528

Patch-For-Review

Change 186528 merged by jenkins-bot:
ce.MWReferencesListNode: Remove unnecessary .show() call

https://gerrit.wikimedia.org/r/186528

Change 186524 merged by jenkins-bot:
Don't use .hide() in ve.ui.Context constructor

https://gerrit.wikimedia.org/r/186524

Change 186527 merged by jenkins-bot:
Re-implement ve.ce.ResizableNode#showHandles using CSS

https://gerrit.wikimedia.org/r/186527

Change 188733 had a related patch set uploaded (by Krinkle):
mw.ViewPageTarget: Use CSS instead of JS for DOM hiding/muting

https://gerrit.wikimedia.org/r/188733

Patch-For-Review

Krinkle renamed this task from ~200ms spent on CSSStyleDeclaration.getPropertyValue() to ~200ms spent on CSSStyleDeclaration.getPropertyValue() due to jQuery hide()/show().Feb 5 2015, 2:55 AM

Change 188733 merged by jenkins-bot:
mw.ViewPageTarget: Use CSS instead of JS for DOM hiding/muting

https://gerrit.wikimedia.org/r/188733

Still seeing this:

Screen_Shot_2015-02-12_at_16.19.44.png (351×593 px, 40 KB)

(On osmium's Barack Obama, all repos on HEAD)

In T87160#1035744, @ori wrote:

Still seeing this:

Screen_Shot_2015-02-12_at_16.19.44.png (351×593 px, 40 KB)

(On osmium's Barack Obama, all repos on HEAD)

That's because it's using $.fn.animate rather than CSS transitions. Could we file that as a separate bug please? It's not to do with show/hide or getPropertyValue.

matmarex added a subscriber: matmarex.