From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/47146 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Possible memory leak? Date: Sun, 01 Feb 2009 16:03:39 +0100 Message-ID: <4985B9CB.6010409@wxs.nl> References: <68bfdc900902010644t71ec3644ue02d9fd29ef73282@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1233500730 19197 80.91.229.12 (1 Feb 2009 15:05:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Feb 2009 15:05:30 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Feb 01 16:06:41 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1LTduB-0000jJ-0Q for gctc-ntg-context-518@m.gmane.org; Sun, 01 Feb 2009 16:06:39 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C93861FDFC; Sun, 1 Feb 2009 16:05:16 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 24345-01; Sun, 1 Feb 2009 16:04:16 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B74851FDC8; Sun, 1 Feb 2009 16:04:16 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 960401FDC8 for ; Sun, 1 Feb 2009 16:04:15 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 17608-03 for ; Sun, 1 Feb 2009 16:03:40 +0100 (CET) Original-Received: from filter4-nij.mf.surf.net (filter4-nij.mf.surf.net [195.169.124.155]) by ronja.ntg.nl (Postfix) with ESMTP id 484851FBCC for ; Sun, 1 Feb 2009 16:03:40 +0100 (CET) Original-Received: from mail.pragma-ade.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by filter4-nij.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n11F3c6C007101 for ; Sun, 1 Feb 2009 16:03:39 +0100 Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by controller-1 (SurgeMail 3.9e) with ESMTP id 7797-1840426 for ; Sun, 01 Feb 2009 16:03:38 +0100 User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) In-Reply-To: <68bfdc900902010644t71ec3644ue02d9fd29ef73282@mail.gmail.com> X-Originating-IP: 10.100.1.100 X-Authenticated-User: hagen@controller-1 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=83.247.100.17; country=NL; region=16; city=Dronten; latitude=52.5333; longitude=5.7167; http://maps.google.com/maps?q=52.5333,5.7167&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 173349350 - 770b0d2cbc40 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.155 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:47146 Archived-At: Yue Wang wrote: > Hi, Hans: > > in font-afm.lua, you use fontforge to open and to_table a pfb, but > without closing it? ok, thanks for noticing, i added a fontforge.close(pfbblob) > btw, when MKIV is running for the first time (i.e., no cache file). it > will use a lot of memory (parsing a 10M font will use 700-800 MB hm so much? > memory), are there some ways to reduce that? Another problem is, the > memory usage seems incremental: > I watch the memory usage in "top" carefully, it does not reduce when > MKIV finish reading and caching an otf font. (well I read the > font-otf.lua, and you are actually closing that font. so maybe that's > because luatex is leaking memory?) it's hard to say ... it related to the lua garbage collector i already discard the loaded table and reload from cache (which save mem) but one has to wait till the garbage collector kicks in which can later also, mem consumption reported is a bit of a lie because lua seems to allocates double of what it needed with each increment but not always use it otf fonts are already quite packed in mkiv (i'm considering adding an option to mtx-font to precache fonts but i'm not sure if it's worth the trouble is mem consumption less a second run? we use our mk document as test and there mem consumption is ok (given the number of loaded fonts) 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 ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________