groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Lack of professionalism ....


From: Ingo Schwarze
Subject: Re: [Groff] Lack of professionalism ....
Date: Wed, 11 Mar 2015 18:28:29 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

Hi Werner,

Werner LEMBERG wrote on Sat, Mar 07, 2015 at 07:38:44PM +0100:

> Well, the ms macros are *much* simpler than mdoc's highly nested macro
> parsing.  You should really try unprocessed vs. processed mdoc,
> applied to a very long man page, and you will see a significant
> difference in processing time.

Actually, the relative gain in speed is larger for *smaller* manual
pages.  In my last mail, i have shown that the stripping only shaves
10-15% off of the time to format the 137kB, 5671 line ksh(1) manual.

For the 4.9kB, 188 line cat(1) manual, the speedup is twice as
large, about 25-30% (81 vs. 111 Milliseconds; mandoc(1) for comparison:
6.3 Milliseconds, which is 13 to 18 times faster; by the way, running
just wc(1) on the manual takes 3 Milliseconds, so mandoc(1) only
consumes twice the time already needed for merely reading the file
from the buffer cache).

I guess this indicates that the speedup is mostly due to the economy
*reading in* the macro file, not so much the economy *expanding*
the macros.  In any case, saving time is more relevant for large
documents and less so for small ones that take only fractions of a
second in the first place, which makes the optimization even more
questionable.

Yours,
  Ingo

P.S.
Note that the stripping reduces the size of the mdoc macro set from
240kB to 137kB (-43%).  Comparing that to the speedup of just below
30% confirms the suspicion that the effect from reading the macroset
probably dominates the speedup.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]