[metapost] memory problem
Denis.Roegel at loria.fr
Mon May 8 15:52:32 CEST 2006
On Mon, May 08, 2006 at 12:06:24AM +0200, Stephan Hennig wrote:
> Denis.Roegel at loria.fr schrieb:
> > Stefan's initial (and perhaps non realistic) example
> For a realistic example: the following code draws a binary tree of depth
> 3 (15 nodes) and runs for seconds! Running time for drawing a tree of
> depth 4 with a tremendous number of 31 nodes is beyond my tolerance.
> Could people in the 80ies perhaps have saved years waiting for fonts
> being rendered if MetaFont's code were a bit more optimized? :)
I think there are two problems which need to be separated.
First, metaobj keeps track of a lot of information,
and sometimes there may be more optimal workarounds.
In the case with rounded corners boxes in metaobj, it would
be possible to get rid of the stored equations by doing
a bit more work when drawing. Maybe I will do it.
But this doesn't solve the whole problem, because the user
may still want to add some special path to an object, and
he may want this path to be transformed along with the object.
One could imagine that I store a path as a path, and not
as a set of control points, and it would be somewhat like
pictures which are not ``floating'' when stored.
This change on paths would require some surgery, although
probably not that much.
But this doesn't answer the slow solving of a large number
of independent equations. I think we should work on a non-metaobj
example and focus on it.
More information about the metapost