[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: API pair_content() call is about 7x slower on Fedora 29 vs Bionic

From: Bryan Christ
Subject: Re: API pair_content() call is about 7x slower on Fedora 29 vs Bionic
Date: Thu, 27 Dec 2018 19:09:09 -0600

I was testing the performance of pair_content() 2 different ways.

1.  The very unscientific, observation that "pspg" (a db pager) was scrolling
very slowly horizontally when testing my emulator on F29 but not on Bionic.
2.  I placed both instances under callgrind which surfaced pair_content() as
being quite consuming on F29 but not Bionic.

Since my terminal emulator really has no idea how the caller setup their
color pair matrix/bindings, the only reliable thing I can do is iterate through
the enumerated pairs looking for the fg / bg set they specified.  Albeit, I was
already planning to write and interface that allows the implementer to supply their
own interface equivalent to pair_content() with the assumption that the caller has
intimate knowledge of the mappings.  For my own demo program, I did that, and
the performance I expected returned.   

The observations/differences were noted in both xfce4-terminal and gnome-terminal
in F29 vs Bionic.  A quick peek at both shows that in all cases TERM is set to
xterm-color256 so I doubt there's a big difference there. 

On Thu, Dec 27, 2018 at 6:44 PM Thomas Dickey <address@hidden> wrote:
On Thu, Dec 27, 2018 at 05:30:55PM -0600, Bryan Christ wrote:
> I spent quite a bit of time tracing down performance issues on Fedora 29.
> It turns out, that for whatever reason, pair_content() is about 7x slower
> in the ncurses build that comes with Fedora 29 vs the build included with
> Bionic Beaver.

In a quick check, it seems that Fedora 29's using ABI 6 (infocmp hints that
supports 6.1's extended pairs) while Bionic is still using ABI 5:
        + no wheel-mouse
        + limited to 16 colors

Is this for the same terminal description?  How are you testing pair_content?
With ABI 6 (whether or not using 6.1), you can have a lot more color pairs,
which may be misleading.

fwiw, Debian/testing seems fairly comparable to Fedora29.  Ubuntu lags
that by a year or two -ymmv

Thomas E. Dickey <address@hidden>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]