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 -----------------------------------------------------------------