Comment 9 for bug 682338

Revision history for this message
In , Ryan Prichard (ryan-prichard) wrote :

I use NX to connect to a work computer from home, over the Internet. I recently upgraded to Ubuntu 10.10, and I noticed that GTK programs became very sluggish.

I currently have 1.10.0-1ubuntu3 of libcairo2 installed. If I override this with the Ubuntu 10.04 version of libcairo2, 1.8.10-2ubuntu1, performance is restored. I used LD_LIBRARY_PATH to run GTK programs with the old libcairo2 package.

I first reported this issue against Ubuntu 10.10, but since the problem is in Cairo (or NX), an Ubuntu maintainer suggested I report it here. The Ubuntu bug report is at https://bugs.launchpad.net/ubuntu/+source/cairo/+bug/682338. It has a video attached demonstrating how much faster gedit is using the old libcairo2 package.

Both the home and work computer run Ubuntu 10.10.

In addition to the performance drop, I see JPEG artifacts on rendered text and metacity window decorations. I'm used to seeing some artifacts because NX compresses things like icons with JPEG. NX doesn't normally compress text, window decorations, etc. The slow performance and artifacts suggests that NX is transmitting bitmap data when it should be transmitting drawing commands.

The work computer has these NX packages installed:
nxclient-3.4.0-7
nxnode-3.4.0-14
nxserver-3.4.0-14

The home computer only has the nxclient-3.4.0-7 package installed.

The ping times from my home computer to work computer are about 35ms.

I made a Cairo Git checkout and verified that when I built 1.8.10, gedit was fast, but when I built the newest version, gedit was slow. git bisect identified a single commit where the performance problem began:

commit 33be73dfb76c26e3bb0ab59b2f570d00d9c7be62
Author: Chris Wilson <email address hidden>
Date: Fri Sep 11 14:59:58 2009 +0100

    [xlib] Fix big-line.

    Project lines that exceed the 16.16 limits onto the XFixedLine, as we know
    that top/bottom must fit within the confines of the surface and so will be
    less than 16 bits.

    Sadly this is a run-on patch that also does:
    1. Make FillTiled the default for new GCs.
    2. Stores extend mode as opposed to repeat, and thereby cleaning up some
    inconsistent code.
    3. Remove the special casing for unbounded trapezoids, as it is redundant
    with the polygon clipping.
    4. Tidy the logic for deciding when to use the core protocol
    (_categorize_composite_operation)

When I searched the Internet for "Ubuntu 10.10 slow NX", I noticed a similar-looking problem reported on a forum.
 - http://ubuntuforums.org/showthread.php?t=1625513