On Sun, Jun 22, 2003 at 09:55:22PM -0400, Alexander R. Pruss wrote:
> When one opens a new record, DrawParagraph() calls GetLineMetrics() and
> WriteLine() for every line.  It should be possible to save half of the
> effort by calling only GetLineMetrics() (and doing some adjustments to the
> code) after the on-screen data is drawn.  This should cut page loading
> time in half.  (Initial experiments are not completely successful, because
> I don't fully understand the two functions, but there is a great speedup.)

The whole point behind GetLineMetrics() is to figure out exactly how
big the document is for the sake of the scrollbar, etc. Unfortunatly
it does technically have to pre-render everything to get an accurate
idea on the height of things.

A better way to optimize it is to somehow cache the data
GetLineMetrics() builds so that when DrawParagraph() actually starts
drawing to the screen, it doesn't have to re-calculate already
rendered data.

I worked on a solution to this about a year and a half ago. I can send
you a diff if you want... overall it worked but had its limitations.

Fortunatly some of the issues I saw with it I also experienced under
the multiimage branch and subsequently found a solution for. Now might
be a good time to dig this patch out of the cellar.

-- 
Adam McDaniel
Array.org
Calgary, AB, Canada
_______________________________________________
plucker-dev mailing list
[EMAIL PROTECTED]
http://lists.rubberchicken.org/mailman/listinfo/plucker-dev

Reply via email to