Bug 205212 - konsole window initialization very slow
Summary: konsole window initialization very slow
Status: RESOLVED REMIND
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-26 17:50 UTC by Clemens Eisserer
Modified: 2011-08-07 03:28 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Clemens Eisserer 2009-08-26 17:50:56 UTC
Version:            (using KDE 4.3.0)
OS:                Linux
Installed from:    Fedora RPMs

Konsole is quite slow initializing its UI. 
Although the application window does show up quite fast - the window stays at background color for ~2s before it initializes its black background.

On my Core2Duo machine this is annoying, but recently I bought a Netbook with 1.6ghz atom processor where the window stays  ~5s at gray background color. Gnome-Terminal starts up in a fraction of that time.

I did some profiling using sysprof and quite a lot of time is spent inside X in the function ProcListFonts. 
Could it be Konsole queries core-fonts at startup synchronous?

Thanks, Clemens
Comment 1 Robert Knight 2009-08-27 21:40:30 UTC
> Could it be Konsole queries core-fonts at startup synchronous?

Konsole does nothing special with fonts itself, it will go through the standard Qt initialization code which is run for all KDE applications.  Is Konsole the only slow application or are any other KDE applications affected?

A few questions to try and diagnose the problem:

1.  Is Konsole CPU bound whilst starting up?  That is does it show up at the top of the process list in ksysguard sorted by CPU whilst starting up?
2.  Does it help if you turn off compositing?
3.  Does it help if you run with -graphicssystem raster?
4.  Which terminal font are you using?
Comment 2 Oliver 2010-03-10 07:28:07 UTC
I noticed the same behavior recently when my distro (Gentoo) upgraded QT from v4.5.3 to v4.6.2.

It doesn't happen with all fonts (e.g. Bitstream Vera Sans Mono, Courier New, DejaVu Sans Mono are working fine). Other fonts like Bright (8pt, which I used before the QT update but is now so small and slow that I can't use it anymore), Feynman, Gamow, Terminal [Bitstream], Terminus are not usable anymore.

To answer your questions: 
1. yes, konsole goes up to over 50% sometimes when either selecting one of the fonts causing problems or starting a konsole window. However, the problem occurs only with the first konsole window. If I start konsole again while there's already another konsole session running everything is fine. If I close all konsole sessions and start konsole again, the problem is back.
2. where should I do this?
3. no
4. currently Bitstream Vera Sans Mono because it works without problems.

I'm using KDE 4.3.5 (compiled from source), system is a Intel Core2 Quad CPU    Q6600 @ 2.40GHz, 3 GB RAM.

I didn't notice problems with other applications after upgrading to QT 4.6.2.

Oliver
Comment 3 urcindalo 2010-03-16 10:10:44 UTC
I added the comment below to bug#221609 but I also reproduce it here:
=====

I recently changed my 17" CRT monitor to an "old and square" 19" LCD.

At 96 dpi terminus-font-4.30 looks as glorious as ever in my new monitor. But
the *real* dpi of my 1280x1024 resolution are 86, so I'm setting 86 dpi through
a bash script in my ~/.kde4/env/ folder:

---
$ cat ~/.kde4/env/dpi.sh
#!/bin/bash
xrandr --dpi 86
---

since for some reason the nouveau driver for my old Nvidia GeForce 5200 FX
card, or xorg-server, or whichever, insists of seeing my screen dimensions
smaller than they actually are, incorrectly setting the dpi to 96.

The thing is when I start up KDE with an 86 dpi setting, all fonts look OK
except terminus-font from portage. I use it as my Konsole default font. It just
looks horribly and even misplaces characters in the screen, almost overlapping
some of them.

As a workaround I've downloaded the current TTF versions of the terminus font
from a webpage, so un-emerging terminus-font and installing these TTF variants
by hand solves the problem for me. But I'm just curious as to why terminus-font
renders so badly at 86 dpi.
Other mono fonts look OK.
Comment 4 Jekyll Wu 2011-08-07 03:28:18 UTC
Can't reproduce it with KDE-4.7.0

Feel free to reopen if this still happens in recent version.