bug-texinfo
[Top][All Lists]
Advanced

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

Post release texi2any performance regression


From: Gavin Smith
Subject: Post release texi2any performance regression
Date: Sat, 21 Oct 2023 19:17:32 +0100

Typical texi2any run times are somewhat longer now, compared with the
last released version ("time" output below) - roughly 5% longer.

Any idea what's responsible for the longer run times?  At what point
with the new code did the performance get worse?

I've run texi2any with NYTProf both for 7.1 and master.
The same parts of the code seem to be responsible as before for
large parts of the run times - the only things that look new are
Texinfo::Parser::build_document (called 2412 times on the input I was
testing), and Texinfo::StructTransf::rebuild_document (called once).
Could it be these new functions that are responsible or could some other
change be responsible?)

(However the top four functions are the same:

Texinfo::Convert::Plaintext::_convert
Texinfo::Convert::Plaintext::_process_text
Texinfo::Convert::Plaintext::_count_added
Unicode::Collate::getWt

with Texinfo::Convert::Plaintext::_convert being called a very slightly
higher number of times (443839 versus 442836).)

With texi2any 7.1 (using a version of the glibc manual I downloaded
for testing):

$ time ../tp/texi2any.pl ~/src/texinfo/libc/libc.texinfo 
creature.texi:309: warning: `.' or `,' must follow @xref, not f

real    0m6.199s
user    0m5.964s
sys     0m0.225s

With the current development version (commit d813c10d, today):

$ time ../tp/texi2any.pl ../../libc/libc.texinfo 
creature.texi:309: warning: `.' or `,' must follow @xref, not f

real    0m6.631s
user    0m6.350s
sys     0m0.280s

(I configured both builds with
"./configure -C 'CFLAGS=-g -O0' 'PERL_EXT_CFLAGS=-g -O0'" to try to
have a fair comparison.  I ran "time" several times and have only included
a typical output for one run.)


Comparing a default build (no "-g -O0" flag) for another input manual:


7.1:

$ time texi2any  ../../emacs-lispref-27.2/elisp.texi 
functions.texi:2390: warning: @inforef is obsolete
errors.texi:226: warning: unexpected argument on @ignore line: The following 
seem to be unused now.

real    0m5.424s
user    0m5.223s
sys     0m0.197s

master:

$ time ../tp/texi2any.pl ../../emacs-lispref-27.2/elisp.texi 
functions.texi:2390: warning: @inforef is obsolete
errors.texi:226: warning: unexpected argument on @ignore line: The following 
seem to be unused now.

real    0m5.978s
user    0m5.689s
sys     0m0.220s

That is about 10% longer.  Perhaps there is more overhead at creating a new
parser object?




reply via email to

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