Bug 758456

Summary: gnome-shell freezes/high CPU usage when switching terminals
Product: [Fedora] Fedora Reporter: Matt Chan <talcite>
Component: gnome-shellAssignee: Owen Taylor <otaylor>
Status: CLOSED DEFERRED QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: behdad, browning48ky, maxamillion, otaylor, samkraju, talcite, walters
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-03 03:04:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Matt Chan 2011-11-29 20:30:10 UTC
Description of problem:
When I switch between tabs several times using ctrl + pgup/dn in rapid succession on gnome-terminal (and the focus is on the terminal itself), gnome-shell freezes for 2-5 seconds. No windows update during that period of time and I am unable to switch windows as well. System monitor shows that all 4 of my CPUs go from idle to 70% usage during that time.

I think this is limited to gnome-shell because my music continues playing.

Interestingly enough, the freeze does not happen when the focus is on the tabs of gnome-terminal.

This can severely affect the productivity of people who use several terminals at once.

Version-Release number of selected component (if applicable):
N/A

How reproducible:
Always

Steps to Reproduce:
1. Open several tabs in gnome-terminal
2. Make sure focus is on the terminal itself (cursor is blinking)
3. Press ctrl+pgup/dn several times quickly, or hold it down to switch tabs
  
Actual results:
gnome-shell freezes for 2-5 seconds

Expected results:
instantaneous switch

Additional info:
My CPU is a quad-core Core i5, and the graphics card line of lspci reads:
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02)

Comment 1 Matt Chan 2011-12-01 23:10:01 UTC
I have some new info.

The slow performance is not present in fallback mode and other terminals I've tested show the same behaviour (terminator and guake), both of which rely on VTE. It also appears that gnome-terminal uses a VTE widget for the terminal window itself. 

My guess is that gnome-shell switches to a separate VTE widget every time I switch tabs. Could someone with more knowledge on gnome-shell comment on this?

I've reassigned the bug to gnome-shell to reflect this.

Matt

Comment 2 Matt Chan 2011-12-03 03:04:03 UTC
Solved it, with some help from the GNOME devs.

The IBus gnome-shell extension is the cause of the poor performance. According to the package notes, it should be natively integrated into gnome-shell soon. Disabling the extension fixes the problem. I lose the on-screen language display, but the shortcut keys for switching input language still works.

Closing the bug for now. Hopefully this helps someone with the same bug in the future.

Matt