ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: mapfiles and pdftex
Date: Wed, 12 Feb 2003 09:09:31 +0100	[thread overview]
Message-ID: <5.1.0.14.1.20030212090614.0231a8e0@server-1> (raw)
In-Reply-To: <87of5inddu.fsf@gundla.ch>

At 08:53 AM 2/12/2003 +0100, you wrote:
>Hartmut Henkel <hartmut_henkel@gmx.de> writes:
>
>Hello Hartmut,
>
> > Don't know what is slow for your PC.
>
>at least two seconds just for the map file.
>
> > I'm just looking into pdftex mapfile.c, about 2and there is in line 142 a
> > for-loop for checking duplicate mapfile entries (tfm). This runs
> > some 3000*0.5*3000 times for parsing your mapfile lines, always
> > checking for some strcmp() == 0. You can speed this up if you put a
> > line "if (*(e->tfm_name) != *buf) continue;"
>
>But this also looks like O(n^2) to me. With 3000*3000 is some 9 million!
>
> > So there might be some corner for improvement. Using strcmp() the
> > reverse way seems not to speed up things; how to write a more
> > sophisticated inequality-checker?
>
>Heiko stated that he used a hash table for this. This will speed up
>things dramatically.

but if i remember right he only looked at the first 8 chars (assuming 
berry) which is not that useful for texnansi-* files -)

the best way (imo) is to let later entries overload previous ones, so not 
much checking is needed at all;

>But this is getting slightly off topic, isn't it?

future versions of pdftex will solve this problem;

another thing is reading map files after the first page is shiped out; that 
would permit us to postpone map file loading and speed things up a bit; 
currently, if you want to use a specific font on page 328 you must make 
sure that the associated map file is loaded before page 1 is finished!

Hans


-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

  reply	other threads:[~2003-02-12  8:09 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-10 11:58 Using the free PS Fonts with ConTeXt Maarten Sneep
2003-02-10 12:42 ` Hans Hagen
2003-02-10 13:03   ` Maarten Sneep
2003-02-10  9:50     ` John Culleton
2003-02-10 13:26   ` Bruce D'Arcus
2003-02-11 13:29   ` Maarten Sneep
2003-02-11 19:14     ` Harri Hakula
2003-02-11 20:32       ` Patrick Gundlach
2003-02-11 21:19         ` Bruce D'Arcus
2003-02-11 21:34           ` Patrick Gundlach
2003-02-11 22:07             ` Hans Hagen
2003-02-11 22:24               ` Patrick Gundlach
2003-02-11 23:52                 ` Hartmut Henkel
2003-02-12  7:53                   ` mapfiles and pdftex Patrick Gundlach
2003-02-12  8:09                     ` Hans Hagen [this message]
2003-02-12 14:07                       ` Jens-Uwe Morawski
2003-02-13 11:06                         ` Hans Hagen
2003-02-13 15:56                           ` Jens-Uwe Morawski
2003-02-13 16:43                             ` Hans Hagen
2003-02-13  6:25                   ` Re: Using the free PS Fonts with ConTeXt Berend de Boer
2003-02-10 14:28 ` Patrick Gundlach
2003-02-11 13:26   ` Maarten Sneep
2003-02-11 14:25     ` Patrick Gundlach
2003-02-12 14:11       ` Jens-Uwe Morawski
2003-02-13  8:42         ` Patrick Gundlach
2003-02-10 14:30 ` Adam Lindsay
2003-02-11 13:22   ` Maarten Sneep

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5.1.0.14.1.20030212090614.0231a8e0@server-1 \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).