[Top][All Lists]

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

Re: Making Texinfo XS parser the default?

From: Gavin Smith
Subject: Re: Making Texinfo XS parser the default?
Date: Tue, 1 Oct 2019 12:12:28 +0100

On Tue, Oct 1, 2019 at 11:35 AM Norbert Preining <address@hidden> wrote:
> > I wondered if anybody has run Texinfo a lot with TEXINFO_XS_PARSER set
> > in the environment? This speeds texi2any up by about 30% but it is not
> Is there another way to set this per default? I can test run it in
> Debian, we are far from a release so doing this would give it a lot of
> tests.

That would be great. The change below would make the XS parser the
default, and disabled by setting TEXINFO_XS_PARSER to 0.

diff --git a/tp/Texinfo/ModulePath.pm.in b/tp/Texinfo/ModulePath.pm.in
index dfd4fd3f3..0a27e85c7 100644
--- a/tp/Texinfo/ModulePath.pm.in
+++ b/tp/Texinfo/ModulePath.pm.in
@@ -101,7 +101,8 @@ sub init {
     my ($coderef, $filename) = @_;
     if ($filename eq 'Texinfo/Parser.pm') {
       my $replacement;
-      if ($ENV{TEXINFO_XS_PARSER}) {
+      if (!defined $ENV{TEXINFO_XS_PARSER}
+             or $ENV{TEXINFO_XS_PARSER} ne '0') {
         $replacement = 'Texinfo/XS/parsetexi/Parsetexi.pm';
       } else {
         $replacement = 'Texinfo/ParserNonXS.pm';

reply via email to

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