At 08:53 AM 2/12/2003 +0100, you wrote:
Hartmut Henkel <[EMAIL PROTECTED]> 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 | [EMAIL PROTECTED]
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
-------------------------------------------------------------------------

_______________________________________________
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to