Re: Possible Pango 1.4 ideas



On Thu, 2003-01-23 at 20:17, Owen Taylor wrote:
> 
> Joaquín Cuenca Abela <cuenca pacaterie u-psud fr> writes:
> 
> > On Wed, 2003-01-22 at 23:51, Owen Taylor wrote:
> > > 
> > > Joaquín Cuenca Abela <cuenca pacaterie u-psud fr> writes:
> > > 
> > > > [*] ie., I've not measured it, just seen GtkTextView in action... but I
> > > > don't how representative is GtkTextView 
> > > 
> > > Quick timing is that GtkTextView is about 14 times as fast as
> > > AbiWord 0.99.4 at laying out text. (Yeah, it's an old copy
> > > of AbiWord, but what I had available to try on the machine
> > > where I was doing the timing.)
> > 
> > You're right.  My apologies.  The text files that I was opening with
> > GtkTextView were much bigger than I first thought (they didn't seem to
> > be *so* big until I opened them with abiword and I saw the number of
> > pages), and I got the impression that GtkTextView was lagging.
> 
> One thing to realize is that text editors like Emacs or vi are
> _really fast_. They generally don't actually lay out the text,
> and instead simply count lines, or (for Emacs) characters, when
> setting up the scrollbars.

That's really embarrassing... I got so misguided in my appreciation
because I created the text file starting with 1 line, and with a series
of:

cat test.txt >> test2.txt && cat test2.txt >> test.txt
...

and I miserably missed the exponential grown rate...

When I opened it with emacs, it was instantaneous, and with GtkTextView
I had to wait several seconds for the scrollbars to stop growing.

In fact, the file was over 500 pages once I opened it in AbiWord.

At least, I know where the poor performance comes from... several months
ago we identified a little piece of code in AbiWord that raises the
layout complexity to O(n^2) (with n the number of lines), but it was not
yet showing in the top of the profilers, so we (mainly Tomas) started
fixing other stuff (we got a x4 improvement on loading).  I hope to be
able to find a bit of free time to fix these issues.

We're doing less complex things than pango most of the time, so I hope
that we will be able to bring abiword up to pango speed.

Again, sorry for the FUD.

-- 
Joaquín Cuenca Abela
cuenca pacaterie u-psud fr




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