Mojca Miklavec wrote:
Hans wanted to implement \definefontsynonym [a] [b] to automatically work whether b is a font name, font filename or the old good tfm font.
Even though the idea sounds OK and works well in LuaTeX, there's a big problem with it, namely, it becomes so annoyingly slow that it's basically useless (just for fun, you can try to remove file: in front
huh? resolving synonyms is pretty fast \starttext \definefontsynonym[mojca][is wrong] \testfeatureonce{10000}{\xdef\test{\truefontname{mojca}}} mojca \test \stoptext and the overhead in the loop probably takes most time
I forgot whether the first one is already accepted (maybe it is), but it any case it takes a lot of time before the right font is found.
i think that when xetex had no tested we were forced to use batchmode which then resulted in many logs messages but that's long ago
The current clever scheme causes more problems & longer load times than it brings advantages, but unless Hans changes core macros, there's not much that you can do about it to speed up the loading time.
well, the problem is that xetex uses this mixture of [whatever] and "whatever" and "[whatever]" syntax which might be nice for latex but as context uses [] for optional args it complicates things an option is to make special typescript files for xetex (which is not a bad idea because then we can optimize the otf typescripts for luatex usage) so, it must be some other problem ... \starttext \switchtobodyfont[10pt] \input tufte \endgraf \switchtobodyfont[11pt] \input tufte \endgraf \switchtobodyfont[12pt] \input tufte \endgraf \stoptext gives and a texexec run of 2.5 seconds and \dorecurse{1000}{ \switchtobodyfont[10pt] mojca \switchtobodyfont[11pt] is \switchtobodyfont[12pt] wrong } takes 10 seconds ok it takes 3.5 seconds in mkiv but there we have a more optimal font system due to less fonts needed; pdftex takes 9 seconds, so the difference between mkii pdftex/xetex is 1 second which is mostly due to the fact that xetex is unicode, uses larger fonts, does otf etc etc now, the timing for \usetypescript[iwona] [ec] \usetypescript[palatino] [ec] \usetypescript[postscript][ec] \usetypescript[modern] [ec] \starttext \switchtobodyfont[iwona, 10pt] mojca \switchtobodyfont[iwona, 11pt] is \switchtobodyfont[iwona, 12pt] wrong \switchtobodyfont[palatino, 10pt] mojca \switchtobodyfont[palatino, 11pt] is \switchtobodyfont[palatino, 12pt] wrong \switchtobodyfont[postscript,10pt] mojca \switchtobodyfont[postscript,11pt] is \switchtobodyfont[postscript,12pt] wrong \switchtobodyfont[modern, 10pt] mojca \switchtobodyfont[modern, 11pt] is \switchtobodyfont[modern, 12pt] wrong \stoptext is as follows: pdftex: 2.4s, luatex 4.3s, xetex 11.7s now, interesting is that if we only load one of them xetex needs 9.5 seconds, so there seems to be quite some initialization time involved so, i looked into this caching stuff and found out that fc-cache -v first deletes an invalid cache and on a next run tries to make a cache and fails which then is the reason why *each* xetex run needs to build it sown cache (which is quite visible with some filehandle tracing tool) i noticed that there is also a failed message when caching c:\windows\fonts so maybe fc-cache is messed up anyhow, it's not a context issue at all, just caching Hans 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 -----------------------------------------------------------------