Don't know what is slow for your PC. I'm just looking into pdftex
mapfile.c, and 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;"
into the begin of the for-loop (you need braces then!). Then the loop
goes to the next map line already, if the 1st letters do not match. I
have generated some 3000 random mapfile entries for testing (letters
equally distributed). time pdftex on an almost empty TeX file "A \bye"
tells:

without patch
real    0m1.463s
user    0m1.370s
sys     0m0.020s

with patch checking inequality of 1st letters
real    0m0.990s
user    0m0.880s
sys     0m0.030s

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?

Greetings Hartmut


On Tue, 11 Feb 2003, Patrick Gundlach wrote:

> Hans Hagen <[EMAIL PROTECTED]> writes:
>
> Hello out there,
>
> >>Right. LaTeX does not use the run-time loading of mapfiles.
> >
> > here i've split up the files (otherwise they become anoyingly large)
> > (actually, this is why latex pdftex people have proposed to patch
> > pdftex, because it's so slow on the large map files, something i never
> > noticed since i use small ones -)
>
> If I remember correctly there was a sub-optimal sorting algorithm
> used. With 3000+ lines in my mapfile this is getting very slow :( And
> even in tetex 2.0 this is (as I have heard) not fixed.
>
>
> Patrick

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

Reply via email to