Switching to tab showing github source view is very laggy

NEW
Unassigned

Status

()

8 years ago
7 years ago

People

(Reporter: jdm, Unassigned)

Tracking

({perf})

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

8 years ago
With a few pages open including the one in the URL, I see vastly different tab switching behaviour.  Specifically, flipping between any tab with ctr+tab is an instantaneous affair, except for the github one.  Switching to that one, there's a very visible delay (up to a second, I believe) before the tab bar updates and the content repaints, and the browser is unresponsive until that happens.
(Reporter)

Comment 1

8 years ago
Hmm, looks like a whole bunch of time is being dedicated to CSS rules processing on page load, at least.  sysprof shows SelectorMatchesTree taking 22.4% of cumulative time in one context, and 4.56% in another.
(Reporter)

Comment 2

8 years ago
Granted, I later discovered that I couldn't reproduce the problem with more tabs open, so I opened up https://github.com/wowus/pipe/blob/master/pipe.c#L825 and https://github.com/wowus/pipe/blob/master/pipe.c#L717 as well.  At first, switching was instantaneous, but within 30 seconds I was receiving those huge delays again.
(Reporter)

Comment 3

8 years ago
It looks like if I just keep switching tabs, I can reproduce this behaviour in a fairly short period of time.  sysprof shows SelectorMatchesTree taking 19.18% cumulative time (RuleProcessorData::IsLink 6.44%, SelectorMatches 6.13%), all coming from nsWindow::OnExposeEvent which ends up in PresShell::WillPaint.  I see a similar tree from nsSynthMouseMoveEvent::Run, which processes restyles and ends up spending 11.59% in SelectorMatchesTree (IsLink 4%, SelectorMatches 3.73%).  I have the profile saved, so  I can give more specific information if required.
Summary: Switching to specific tab is very laggy → Switching to tab showing github source view is very laggy
(Reporter)

Updated

8 years ago
Component: General → Style System (CSS)
QA Contact: general → style-system
Whiteboard: [needs profiling and triage]
(Reporter)

Comment 4

8 years ago
Hmm, we also do spend 1.55% of time under js_GC.

Comment 5

8 years ago
laggy scrolling, High CPU usage when clicking and scrolling .
https://github.com/zixaphir/AppChan/blob/master/options.css

Updated

8 years ago
OS: Linux → All
(Reporter)

Updated

7 years ago
Depends on: 705877
You need to log in before you can comment on or make changes to this bug.