[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Excessive memory usage
From: |
Jeff Kingston |
Subject: |
Re: Excessive memory usage |
Date: |
Thu, 11 Apr 2002 08:11:03 +1000 |
Lout uses a lot of memory, for sure. It reclaims the memory devoted
to some part of the document when it prints that part. It basically
prints the document one page at a time unless there is some reason
to hold a page back.
Are your several smaller tables separated by something like @LP or @DP?
(Or in terms of Lout's primitives, a // operator)? If they are separated
by / they will all be held and all printed together. Lout also reads
input in chunks from one @LP or @DP or // etc. to the next.
The only other thing I can suggest (and I've done it myself, not because
tables take a lot of memory, but because they're slow as well) is to
abandon @Tbl and generate simpler Lout, such as
2c @Wide { hello world } | 3c @Wide { second column }
//0.5c
2c @Wide { hello again } | 3c @Wide { second column }
and so on. You need to know the column widths to do this, and you
lose a lot of @Tbl's convenience features, but it runs much faster
and uses a lot less memory and is well suited to program-generated Lout.
Jeff Kingston
On 10 Apr 2002 14:56:01 +0200, Milan Zamazal wrote:
>
> I try to use Lout for print-formatting database tables in some
> application. I'm faced with a problem of an excessive memory usage of
> Lout, unacceptable at a common workstation (> 100 MB). I can understand
> Lout takes a lot (even extremely much, as I've experienced) of memory
> when formatting a huge table. The basic problem is that when I split
> the big table into several smaller ones, Lout's memory consumption is
> reduced, but still about directly proportional to the size of the
> *whole* data.
>
> I'd like to know whether there is a way to make the memory usage less
> dependent on the size of the data.
>
> ...
>
> Can I do something about it? I use Debian GNU/Linux if it matters.
>
> Thanks for any advice.
>
> Milan Zamazal