From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/49805 Path: news.gmane.org!not-for-mail From: Yue Wang Newsgroups: gmane.comp.tex.context Subject: Re: Why searching fonts in xetex is so slow? Date: Sat, 25 Apr 2009 09:44:59 +0800 Message-ID: <68bfdc900904241844h6d20e72bif1e9767b991612e1@mail.gmail.com> References: <68bfdc900903032124u3f6df674lc36e82bb81be2795@mail.gmail.com> <49AE362B.3010506@wxs.nl> <68bfdc900903081914n7897e6d0l5eedb5416a38ca5f@mail.gmail.com> <49B4D328.6050503@wxs.nl> <68bfdc900904240433p3e47c85dj271b7452ceb0b94d@mail.gmail.com> <6faad9f00904241327i5d915157ue6e5b02805e01c3c@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1240623978 26125 80.91.229.12 (25 Apr 2009 01:46:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Apr 2009 01:46:18 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Apr 25 03:47:37 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1LxWzP-0002kC-Qr for gctc-ntg-context-518@m.gmane.org; Sat, 25 Apr 2009 03:47:35 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9426D1FB1F; Sat, 25 Apr 2009 03:46:06 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 08513-05-4; Sat, 25 Apr 2009 03:45:26 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2F2271FA4C; Sat, 25 Apr 2009 03:45:25 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 23ACD1FA4C for ; Sat, 25 Apr 2009 03:45:15 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 08513-05-3 for ; Sat, 25 Apr 2009 03:45:03 +0200 (CEST) Original-Received: from filter3-nij.mf.surf.net (filter3-nij.mf.surf.net [195.169.124.154]) by ronja.ntg.nl (Postfix) with ESMTP id 454FB1FA2B for ; Sat, 25 Apr 2009 03:45:02 +0200 (CEST) Original-Received: from mail-qy0-f103.google.com (mail-qy0-f103.google.com [209.85.221.103]) by filter3-nij.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n3P1j0kS015739 for ; Sat, 25 Apr 2009 03:45:01 +0200 Original-Received: by qyk1 with SMTP id 1so2753128qyk.16 for ; Fri, 24 Apr 2009 18:44:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=xZuc/SfzkKOU5oR5S6+Hq5oj4cuej4LAUdS1M1wBbpo=; b=kmbg7sxcjMAxX1MBeCdBxw0apwqGy+JwLFi87oOTq7AlddoyV+Ecfa7+qQZc9PmEw4 aNUWzxXsX1Z3ftf7TRZEjY+dDtjYR3kdhF74VLlyU0j6UUeQdXbuTzH8Fyma7c9xxNHI 2qCaJPOFpaDSClJLAb5zPdcKrn3vcX/dg/uos= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=TghYoSrBcqPY6QvmbXWoQEUcFco6YuGbLBFUHNm/hvBQVVAoyNVyH3xijftE/V+nib XBshu+PNiSAzYf4MmyvmEZ/TRKDKYvcSrbxEXJUtOkHTLNsM3b5LYArt5wK7H+A+rVNp GimBYdD89rjKUHZSrs/QIgr0wmR/bq6v77KoE= Original-Received: by 10.229.100.7 with SMTP id w7mr1898336qcn.5.1240623899697; Fri, 24 Apr 2009 18:44:59 -0700 (PDT) In-Reply-To: <6faad9f00904241327i5d915157ue6e5b02805e01c3c@mail.gmail.com> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.221.103; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 214499316 - e232a21dbc15 - 20090425 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.154 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:49805 Archived-At: Hi, Mojca: you are absolutely right! When load iwona with the following two typeface, the loading time takes up 7-8 seconds. TeXExec | runtime: 8.296 \definetypeface [iwona] [ss] [sans] [iwona] [default] [encoding=3Dec] \definetypeface [iwona] [mm] [math] [iwona] [default] [encoding=3Dec] \setupbodyfont[iwona,ss,12pt] \starttext \input zapf $$\int_a^b f(x) d x =3D 0$$ \stoptext However, when comment the second line (\definetypeface [iwona] [mm] [math] [iwona] [default] [encoding=3Dec]), TeXExec | runtime: 1.828 total compile time is reduced to only 2 seconds. (of course, equations are typeset in latin modern). How can I speed up math font loading? change add file: suffix (like [file:rm-iwonar]) won't help :( Yue Wang On Sat, Apr 25, 2009 at 4:27 AM, Mojca Miklavec wrote: > On Fri, Apr 24, 2009 at 13:33, Yue Wang wrote: >> Hi, Hans >> >> Now I know why XeTeX uses 1-2 minutes to compile a simple document: >> Each time first-setup.bat runs, it erase the user fontforge cache. >> So if I compile a document right after updating ConTeXt minimals, >> XeTeX will automatically run fc-cache to generate the font cache. >> >> Today I test a little bit, the time used for fc-cache -r is >> approximately the xetex's first running time. > > True, XeTeX runs fc-cache every now and then, but I didn't manage to > figure out when that happens. I would suggest to ask about that on the > XeTeX mailing list. ConTeXt has zero influence on that behaviour, > except that it could avoid searching via fc. > >> Next compilation uses about 7-8 seconds, which is reasonable (it first >> searches the fc cache, then the texmf tree) >> btw, can we change the type-otf.tex to force mkii to search fonts like >> iwona and tex gyre in the texmf tree first? > > Iwona? There are lines like > =A0 =A0\definefontsynonym [Iwona-Regular] [file:Iwona-Regular] [features= =3Ddefault] > which means that it first searches on texmf tree, but I suspect that > math fonts are being searched via fontconfig first. The way font > searching is implemented now ([rm-iwonar] will look for > \font\something=3D"rm-iwonar" instead of \font\something=3Drm-iwona =3D> > this means searching via fontconfig first; the font is not found > there, so it searches in texmf tree further) it is not possible to > convince ConTeXt to search in texmf tree first unless Hans changes > core macros (the part that has been broken for almost a year). > > Mojca > _________________________________________________________________________= __________ > 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-co= ntext > webpage =A0: http://www.pragma-ade.nl / http://tex.aanhet.net > archive =A0: https://foundry.supelec.fr/projects/contextrev/ > wiki =A0 =A0 : http://contextgarden.net > _________________________________________________________________________= __________ > ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________