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.

Event Timeline

ori created this task.Jan 19 2015, 2:50 AM
ori raised the priority of this task from to Needs Triage.
ori updated the task description. (Show Details)
ori added subscribers: ori, Catrope, Krinkle.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 19 2015, 2:50 AM
ori assigned this task to Krinkle.Jan 20 2015, 7:17 PM
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.
Catrope claimed this task.Jan 21 2015, 12:07 AM
ori moved this task from Backlog to Doing on the VisualEditor-Performance board.Jan 23 2015, 7:48 AM
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

Jdforrester-WMF moved this task from Blocked to Q4 on the VisualEditor board.Jan 28 2015, 11:41 PM

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

ori reopened this task as Open.Feb 13 2015, 12:24 AM

Still seeing this:

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

In T87160#1035744, @ori wrote:

Still seeing this:

(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 closed this task as Resolved.Feb 14 2015, 11:35 AM
matmarex added a subscriber: matmarex.
ori moved this task from Doing to Done on the VisualEditor-Performance board.Feb 21 2015, 6:12 AM