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

(mgp-users 00128) Re: embarassingly slow tfont handling...



> > On a PPro200, a 6-line paragraph on 640x480 might take some
> > 2-3 seconds to render.  What is worse, rendering time becomes
> > worse and worse as time goes by, e.g. you switch back and forth
> > on the same pages and it takes longer and longer.
> 
> I cannot reproduce the problem (takes longer and longer) on current snap,
> though it is slow.

i was seeing this on:
	mgp-snap-981221 + local mods (unrelated to rendering or X in general)
	freetype-1.1
	FreeBSD 2.2.6 and 3.1 (don't think it really matters)
	XFree86 3.2 (on 226) and 3.3something (on 3.1)
	1024x768 16bpp truecolor w/ S3 and SVGA servers
    test document: something with the following background
	%default 1 center, fore "black", back "white", bimage "power1.gif", vgap 50, font "rm3"
	(where power1.gif is basically the "powerlogo", a 171x64 image
	with the freebsd daemon)
    the font definition is
	%deffont "rm3" xfont "helvetica-medium-r", tfont "ARIAL.TTF", fore "white" size 4
    the offending text is typically a long paragraph like
	%tab i2 font "rm2",  prefix "      ", icon arc "red" 50
	&i2 bla bla bla this and that and more and again \
	bla bla bla this and that and more and again \
	bla bla bla this and that and more and again \
	bla bla bla this and that and more and again \
	bla bla bla this and that and more and again \
	bla bla bla this and that and more and again

and to really see that it takes longer and longer it may help to put
a couple of gettimeofday() around the while() loop in
draw.c::draw_string()

putting a

	if (back == -1) back = 0 ;

near the beginning of tfont.c::tfc_image() makes thing faster.

The two most evident differences between the two test environment are
i) the use of a true gif image rather than a 'bgrad one' and ii) the X
server.

I think that the fault is somehow in the X server, maybe the gif image
helps trashing its behaviour.


	cheers
	luigi
-----------------------------------+-------------------------------------
  Luigi RIZZO                      .
  EMAIL: luigi@iet.unipi.it        . Dip. di Ing. dell'Informazione
  HTTP://www.iet.unipi.it/~luigi/  . Universita` di Pisa
  TEL/FAX: +39-050-568.533/522     . via Diotisalvi 2, 56126 PISA (Italy)
-----------------------------------+-------------------------------------