On Sun, Mar 09, 2025 at 01:20:26AM +0100, Patrice Dumas wrote: > On Sat, Mar 08, 2025 at 06:23:54PM -0500, Gavin D. Smith wrote: > > This is an automated email from the git hooks/post-receive script. > > > > Disable clean-up at end of program > > > > * tta/perl/texi2any.pl: > > Comment out call to Texinfo::Document::remove_document. > > If there is more than one input file, this allows to bring down the > memory used. Also it is a bit strange that it takes a long time, as it > should only free C structures. I guess that it is indeed slower than > just releasing the memory at exit, but it is cleaner, I think that it > should also be left for tests.
You can check that it takes significant time. See timings at end of this email. For tests, I assume it could be checked if TEST is set? Can the tests be used for checking if all memory is freed by the end? BEFORE: $ for n in 1 2 3 ; do time ../tta/perl/texi2any.pl ../../libc/libc.texi ; done creature.texi:309: warning: `.' or `,' must follow @xref, not f real 0m5.345s user 0m5.030s sys 0m0.312s creature.texi:309: warning: `.' or `,' must follow @xref, not f real 0m5.347s user 0m5.039s sys 0m0.304s creature.texi:309: warning: `.' or `,' must follow @xref, not f real 0m5.364s user 0m5.019s sys 0m0.344s AFTER: 0$ for n in 1 2 3 ; do time ../tta/perl/texi2any.pl ../../libc/libc.texi ; done creature.texi:309: warning: `.' or `,' must follow @xref, not f real 0m5.113s user 0m4.790s sys 0m0.320s creature.texi:309: warning: `.' or `,' must follow @xref, not f real 0m5.165s user 0m4.902s sys 0m0.260s creature.texi:309: warning: `.' or `,' must follow @xref, not f real 0m5.214s user 0m4.902s sys 0m0.308s