[luatex] [lltx] Speeding up otf lua cache file load

Reinhard Kotucha reinhard.kotucha at web.de
Sat Mar 30 03:47:12 CET 2013


On 2013-03-29 at 23:35:54 +0100, Paul Isambert wrote:

 > Dumping formats in order to save time is probably a very good
 > solution, even though not very widespread as far as I can tell (I
 > myself don't use it, but I'm constantly modifying the files I use...).

I could do it because users can't change things anyway.  In medical
environments they aren't even allowed to install software themselves
and the IT departments will not change anything because they don't
want to be responsible if somethings goes wrong.

In general it's quite problematic to provide dedicated format files.
Suppose you've written a LaTeX .cls file for your students in order to
write their theses.  Providing a dedicated format file would speed up
things significantly, especially if packages like tikz or pgfplots are
used, which load zillions of files.

But format files are not portable among different versions of a
particular program, a format file created under TeX Live 2012 will not
work under TeX Live 2013.  The only reasonable way to distribute such
a .cls file is to provide a .zip file which can be extracted either in
TEXMFLOCAL or in TEXMFHOME.

Font preloading makes sense for particular documents.  But the
portability issue of format files remains.

 > > There is not much text in the PDF files, just a few small tables.
 > > Maybe this is the reason why the font subsetting doesn't take much
 > > time.  The main content of the file are ECG plots created with
 > > \pdfliteral.  BTW, my first attempt was to use Metapost but it was
 > > much too slow.  Processing data with Lua and writing PDF stuff
 > > directly into the PDF file is extremely fast.  It's similar to what
 > > you described in a TUGboat article.  The difference is that your
 > > approach is more Metapost orientated while mine is more PostScript
 > > orientated, just because I don't need a user interface.
 > 
 > Nice to know that article rang some bells. 

I'm absolutely convinced that many readers enjoyed this article.  Of
course, I was interested even more because I was doing something
similar already.

 > I think there's a lot to do in that area, and I'll even bet the
 > next new graphic kid on the TeX block will be in Lua.

The main problem with our approach is that there is no graphics state
stack.  Without a graphics state stack there is no currentpoint and
without a currentpoint there is no rmoveto.  It's easy to turn a
circle into an ellipse by modifying the transformation matrix, but
it's useless because the shape of the pen is distorted too.

In order to use the full power of PostScript, it makes more sense to
use Escrito.  It's probably a bit slower than our approach but it
dosn't have all these nasty limitations.

I'm not sure whether a "new graphic kid" will solve our problems.
Taco provided Escrito already.  It currently supports PS Level 1 only,
supporting newer PS levels is planned.  

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha                                      Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                              mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------


More information about the luatex mailing list