From: Hans Hagen <pragma@wxs.nl>
Subject: Re: Metafun - Metapost capacity exceeded
Date: Wed, 05 Apr 2006 10:12:53 +0200 [thread overview]
Message-ID: <44337C05.9000403@wxs.nl> (raw)
In-Reply-To: <4432AA22.2020606@gmx.net>
Thomas Engel wrote:
> Hello Hans,
>
>
> this is the message I got after running texexec pro_mcc_a3.tex.
> As you can see I have increased the memory size for mp.
> I have attached the two tex-files.
> Maybe there is a mistake in the mp-code. A pdf-file will be produced,
> but if you check the output you will see, that one cubicle is missing!
>
ok, i stripped down the sample to one image and coul dgenerate a page
(btw \twodigitMPoutput will make mem usage less but also the quality)
now, the problem is in the way you define your graphic:
def Whatever () =
save SomePicture ;
picture SomePicture ;
lots of draws
SomePicture := currentpicture ;
SomePicture % return value
end
here you *never* erase the currentpicture, so graphic keeps accumulating, and each SomePicture has all previous draws
you can see that on the screen: acrobat takes ages to draw the simple graphic and you can also see it from the mp output (a couple of 100K lines).
solution:
def Whatever () =
save SomePicture ;
picture SomePicture ;
lots of draws
SomePicture := currentpicture ;
currentpicture := nullpicture ; % ADDED
SomePicture % return value
end
or just
def Whatever () =
image (
lots of draws
)
end
So ...
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
next prev parent reply other threads:[~2006-04-05 8:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-04 17:17 Thomas Engel
2006-04-05 6:27 ` Taco Hoekwater
2006-04-05 7:51 ` Hans Hagen
2006-04-05 8:40 ` Taco Hoekwater
2006-04-05 8:12 ` Hans Hagen [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-04-03 17:03 Thomas Engel
2006-04-03 22:29 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44337C05.9000403@wxs.nl \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).