Bug 124214 - Font Rendering with Antialiasing is Slow compared to KEdit when Scrolling
Summary: Font Rendering with Antialiasing is Slow compared to KEdit when Scrolling
Status: RESOLVED NOT A BUG
Alias: None
Product: kate
Classification: Applications
Component: kwrite (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-25 02:46 UTC by Dylan Taft
Modified: 2009-01-06 18:42 UTC (History)
2 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 Dylan Taft 2006-03-25 02:46:01 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    Compiled From Sources
Compiler:          3.4.4  
OS:                Linux

If I type a bunch of gibberish in KWrite, and scroll up and down fast with the scrollbar, it stutters, slows, and tries to catch up, and uses a ton of CPU.

KEdit is fine.

I notice this in a lot of KDE apps, Konqueror does it as well.  It looks like kedit is based off QTextEdit, while KWrite and Kate arn't.  Does QTextEdit do some sort of text buffering, or what can it be doing or not doing that KWrite is?

I was told by the nvidia devs that non grayscale font acceleration is currently unaccelerated with the nvidia driver, and that prior releases, ie, 6xxx did accelerate AA with subpixel hinting but subpixel hinting wasn't working properly so it was disabled alltogether.

So, kwrite and kedit must be both rendering a good portion in software, why is kedit/QTextEdit fast, and kwrite not?  QT components themselves all seem to render text fast.  This was reported before as a general KDE bug, it's more application specific than that.

Also, switching to the vesa driver, the problem still exists.  KWrite is noticibly slower than KEdit, although the nvidia drivers seem to amplify that problem.  It seems the problem is both caused by something some KDE apps do(Kate/Kwrite, Konqueror), and something in the nvidia driver.

All GTK apps seem to be fine, in Vesa, Nvidia, or anything.


When testing, use a size 64 TTF font, with AA and subpixel hinting enabled.  You can notice it with the Vesa driver, but it's MUCH more pronounced with the Nvidia driver, and the Nvidia driver even renders text slower in Kwrite than the vesa drivers do.  
I'm using version 2.1.10 of Freetype.
Comment 1 Dylan Taft 2006-03-25 02:47:04 UTC
X Window System Version 7.0.0, if anyone would like to know that as well.
Comment 2 Hamish Rodda 2006-03-25 03:48:52 UTC
I don't see this problem here (tested with a 5000 line document, AA, subpixel hinting, X.org 6.9, 7800gtx + nvidia drivers, amd X2 2.6ghz)

Do you have composite turned on?
What specs are your cpu + ram?
Can you give some quantitiation of how much slower kwrite is?
Which font are you using?

Is there some step you can take to make this go away, eg. turning off subpixel antialiasing?
Comment 3 Dylan Taft 2006-03-25 03:53:35 UTC
I am using arial.ttf
Your CPU might be fast enough to pick up the slack, that's probably the case.

I am on a 1.8GHZ Athlon XP system, with a gig of pc3200 ram.  Composite is disabled.

Turning off subpixel hinting doesn't do much, but turning off font AA alltogether speeds up kwrite to how it should be.  Lots of people experience this, it's probably best tested on a more mediocre system.
Comment 4 Philip Rodrigues 2006-03-25 15:42:51 UTC
I get the same thing with the nv driver on FreeBSD - kwrite bad, kedit fine.
Dylan, you mention that this has been reported before. Could you give the bug number?
Comment 5 Dylan Taft 2006-03-25 19:26:28 UTC
The old bug was http://bugs.kde.org/show_bug.cgi?id=107690
Comment 6 John Morris 2006-03-28 06:59:40 UTC
I'm experiencing this as well, and I opened the original bug.

I think this bug is mainly on the fx6600 series of nvidia card, but it has been reported on a few others.


As far as the quantitiation question above, I can shoot a quick video with a digital camera pointed at the screen if you think it wouls be useful. As someone of the nvidia message board put it, it feels like a VNC connection in its responsiveness.

GTK is fine.  Also if this is of any help, I compiled the SVN kde4 stuff, and it appears to be fast again there.  I don't know if this is because of qt4 or some change in the kde libs.

Comment 7 Dominik Haumann 2006-03-28 11:42:22 UTC
cullmann had a similar problem some time ago with his nvidia card. Maybe he 
has found a solution?
Comment 8 Jason Mancini 2006-03-31 13:15:38 UTC
Open kwrite.  Hold down a key and get 30-40 characters.  Copy.  Hold down paste such that you get a huge paragraph (no newlines were copied).  Turns my uber-fast machine to slag, with driver nvidia, nv, or vesa.
Comment 9 Christoph Cullmann 2006-04-01 09:06:21 UTC
I had this once, too. With some nvidia driver releases. Really, we can't do much against this.
We double-buffer the text-rendering and we render only the needed parts.
This is pure problem of the X11 installation + driver.
I solved that with newer NVIDIA drivers and had it never again.
That VESA sucks is clear, that NV fails too is interesting, but can't solve this in our software, sorry.
Comment 10 Dylan Taft 2006-04-01 09:12:35 UTC
Christoph,
font AA rendering was once accelerated with the "nvidia" drivers
now it is not, as it didn't render properly when it was accelerated, according to the nvidia devs

If both kwrite and kedit are doing software rendering, why is kedit fine, and kwrite and friends not?
Comment 11 Dylan Taft 2006-04-01 09:18:10 UTC
Hello,

I was curious....

The nvidia drivers used to have hardware acceleration
for font AA, it was taken out as fonts didn't render
properly with subpixel hinting, according to the
nvidia devs.  Now, the nvidia driver uses libfb, part
of X.

KEdit and KWrite both are rendering font AA in
software, do you know why kedit is fast, and kwrite
and friends are not?  Also, GTK apps are all fine. 
This isn't an isolated issue, it's also affecting
other drivers, possibly all ones that render in
software.

Thanks!
Dylan



--- Christoph Cullmann <cullmann@kde.org> wrote:

[bugs.kde.org quoted mail]
----------------------------------------------------------------------------
>              Status|UNCONFIRMED                
> |RESOLVED
>          Resolution|                           
> |INVALID
> 
> 
> 
> ------- Additional Comments From cullmann kde org 
> 2006-04-01 09:06 -------
> I had this once, too. With some nvidia driver
> releases. Really, we can't do much against this.
> We double-buffer the text-rendering and we render
> only the needed parts.
> This is pure problem of the X11 installation +
> driver.
> I solved that with newer NVIDIA drivers and had it
> never again.
> That VESA sucks is clear, that NV fails too is
> interesting, but can't solve this in our software,
> sorry.
> 



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Comment 12 Dominik Haumann 2006-04-01 09:20:24 UTC
> Hold down paste such that you get a huge paragraph (no newlines were
> copied).  Turns my uber-fast machine to slag, with driver nvidia, nv, or
> vesa.


What you describe is a duplicate report of:
http://bugs.kde.org/show_bug.cgi?id=64569

If this is, what this bug report is about, we can mark it as duplicate.
Comment 13 Dylan Taft 2006-04-01 09:24:19 UTC
No, I don't think that's the same issue.

I have dynamic line wrap disabled, it seems that was related to that bug?
Enabling it or disabling it here doesn't really do anything significant for this problem.
Comment 14 Dylan Taft 2006-04-01 09:27:47 UTC
Also, It's been reported here and on the Nvidia support forums, and in #kde, that all the issues seem to be resolved in KDE 4
Comment 15 Nadav Kavalerchik 2009-01-06 18:42:50 UTC
works just fine with the setting bellow:

hp dv7 + debian sid 64bit + kde 4.1.86 
+ nvidia 9600M GT + nvidia 177.82 + Xorg 1.4.2 

nvidia section from xorg.conf: 
Section "Device" 
Identifier "Device0" 
Driver "nvidia" 
VendorName "NVIDIA Corporation" 
BusID "PCI:1:0:0" 
# compiz(fusion) recommands for nvidia 
Option "RenderAccel" "True" 
Option "AddARGBGLXVisuals" "True" 
Option "DamageEvents" "True" 
Option "UseEvents" "False" 
Option "TripleBuffer" "True" 
Option "BackingStore" "True" 
Option "NoLogo" "True" 
#http://userbase.kde.org/GPU-Performance#NVIDIA 
Option "UseCompositeWrapper" "True" 
Option "AllowIndirectPixmaps" "True" 
Option "PixmapCacheSize" "200000" 
Option "OnDemandVBlankInterrupts" "True" 
EndSection