Yue Wang wrote:

- When the font cache is given, LuaTeX seems to use too much memory
(It usually used up to 600M when typeset a document with only 3
Chinese fonts (song,hei,kai)). And this problem is solved by Taco and
Hans several month ago by changing the Lua C source code. However, the
memory footprint is still a little bit large (more than 300M for 3
Chinese fonts). It will take 3-4 seconds on my machine to load the
font cache for three Chinese fonts.

no matter what speedups we are able to cook up in the future, keep in mind that the nature of luatex is that information is passed around in lua tables and this will not change; as a result luatex will always have a larger footprint than pdftex and xetex; for that reason it's good to have multiple engines: xetex is faster and uses less memory (although it has some pretty large usage as well) but has kind of frozen interfaces while luatex is more open with respect to interfaces but at the cost of speed and memory (as soon as one starts to do fancy things with node lists, not only memory usage but also procesing speed compared to the other tex engines becomes a factor); it's simply something that luatex users to accept

- When the font cache is not given, ConTeXt will try to dump one on
the first run. LuaTeX will use much more memory than expected. For
example, only loading the metrics from an ordinary Chinese font like
AdobeSongStd-Light (a 13M font) in plain TeX will use more than 700M
memory. I reported this problem to the ntg-context mailing list
yesterday.

btw, the table of that font is not even that large:

 7.623.626 adobesongstd-light.lua

when dumped and when compiled to byte code:

 3.833.022 adobesongstd-light.luc

when loading this font, it takes soem 25 meg

For a normal publication, usually some 5 or 6 Chinese fonts will be
used. In some cases dozens of these fonts might be used. So it will
take very long time for luatex to parse the fonts, as well as huge
memory to store the metrics data. So it is suggested that users who
want to try luatex should have a computer with large memory and fast
CPU since the fontforge library is a nightmare for Asian users who
have old machines.

by the time that luatex is mature (a couple of years down the road) machines have much more memory so memory is no issue then; disks might be solid state which also helps; processors might not be faster but caching migh be better; but no matter what the future brings ... luatex will never be real fast

(btw, cjk fonts might be large in number of glyphs, but for instance arabic has way more features so there processing time is more an issue)

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

Reply via email to