On Tue, May 12, 2009 at 7:26 PM, Taco Hoekwater <t...@elvenkind.com> wrote: > Hans Hagen wrote: >> >> > Taco Hoekwater wrote: >>> >>> Hans Hagen wrote: >>>> >>>> anyway .. i cannot comment on runtimes as xetex on my windows box runs >>>> too slow (caching issue) and all examples are slow, no matter how i >>>> specify fonts so i will not look into the code till that gets fixed >>>> first >>> >>> The example with the typescript seems logical to me: a typescript does >>> much work beforehand, so I assume SimSum is loaded multiple times. >>> >>> I am trying the AdobeSong example as we speak, there surely seems >>> something wrong there. >> >> let's start with saying that I have no intention to optimize mkii for >> xetex as we decided some time ago (at the context meeting) that we would > > For educational purposes: whether you have > > \definefont[a][file:AdobeSongLight-Std] > or > \definefont[a][file:AdobeSongLight-Std.otf] > > makes no difference to context at all. > > The first makes \a expand into (simplified) > > \font\internala="[AdobeSongLight-Std]" at 12pt\internala > > the second into > > \font\internala="[AdobeSongLight-Std.otf]" at 12pt\internala > > but there are no other macro expansion changes at all. You can test > this yourself by making two alternative files an adding \loggingall > to them, then compare the two logs using diff. > > As to the reason why one of the two is much slower than the other: > I do not know for sure, but I suspect that XeTeX does not cache > the (some of) the internals results of font file assignments with > explicit extensions. The speed difference is most certainly *not* > caused by anything the context macros do. >
disagreed: you can test by yourself that \font\a="[simsun]" \starttext \dorecurse{10000}{ hello {\a 你好}\par} \stoptext runtime: TeXExec | runtime: 2.922 \font\a="[simsun.ttf]" \starttext \dorecurse{10000}{ hello {\a 你好}\par} \stoptext runtime: TeXExec | runtime: 2.938 > Best wishes, > Taco > > PS As to why \definefont is itself slower than \font: it does not > actually define a font \a at a specific size. Instead it defines a > macro \a that defines and then selects a font with an internal, > temporary name, using the local font size etc. > > > > > > > > > > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ > ___________________________________________________________________________________ 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 ___________________________________________________________________________________