Hi, switching from LuaTeX 0.72 to 0.79.1 I experience a dramatic slowdown when reading fonts. I have not gone into details yet. I load texgyre heros (otf) in several instances and my former minimum document compiles in less than 0.5 seconds, now it's up to 2 seconds. I have removed fontloader.to_table() and access the font structure directly, but this didn't change anything. It looks as if the main computation time is in glyph.boundingbox. Is there any way to speed up the bounding box calculation? Patrick
On 4/4/2014 10:54 AM, Patrick Gundlach wrote:
Hi,
switching from LuaTeX 0.72 to 0.79.1 I experience a dramatic slowdown when reading fonts. I have not gone into details yet.
I load texgyre heros (otf) in several instances and my former minimum document compiles in less than 0.5 seconds, now it's up to 2 seconds.
I have removed fontloader.to_table() and access the font structure directly, but this didn't change anything.
It looks as if the main computation time is in glyph.boundingbox. Is there any way to speed up the bounding box calculation?
that calculation has always been there i think; the to_table is not so much the issue as the glyph table (already for some versions) is a virtual table so loading is delayed (also saves mem); there are some cases where the calculation is triggered, but we tried to avoid it with the simple get info case so maybe something else is going on (btw, it might be possible to speedup the loading a bit but that's part of the general speed up of table creation and luigi an i will look into that after 0.80 because we don't want to break something last minute) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
It looks as if the main computation time is in glyph.boundingbox. Is there any way to speed up the bounding box calculation?
I now believe that most of the time is spent accessing a glyph from the list, such as f = fontloader.open(...) f.glyphs[n] and f.glyphs[n].name Is that possible, that this is slowing down the process significantly? Patrick
On 4/4/2014 11:44 AM, Patrick Gundlach wrote:
It looks as if the main computation time is in glyph.boundingbox. Is there any way to speed up the bounding box calculation?
I now believe that most of the time is spent accessing a glyph from the list, such as
f = fontloader.open(...)
f.glyphs[n]
and
f.glyphs[n].name
Is that possible, that this is slowing down the process significantly?
Sure, use this: local g = f.glyphs[n] g.name g.whatever as in your case you create the glyph table again! by using local the glyph table gets collected so the memory footprint is smaller then the few years ago case of creating the whole table in advance (could become huge for cjk fonts) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Patrick Gundlach