texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Gavin D. Smith
Date: Sat, 4 Jun 2022 10:23:08 -0400 (EDT)

branch: master
commit 392ca6f50177001440bc44871f3d17a5193e10fb
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sat Jun 4 15:11:42 2022 +0100

    texi2any --html performance improvements
    
    * tp/Texinfo/Convert/HTML.pm
    (html_attribute_class): Change a method call to a regular call.
    (_protect_class_name): Call _default_format_protect_text directly.
    (_default_format_navigation_panel):
    Access 'formatting_function' hash instead of calling
    'formatting_function' function.
---
 ChangeLog                  | 11 +++++++++++
 tp/Texinfo/Convert/HTML.pm |  9 ++++++---
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 14c40b0047..52a4c5df5e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2022-06-04  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       texi2any --html performance improvements
+
+       * tp/Texinfo/Convert/HTML.pm
+       (html_attribute_class): Change a method call to a regular call.
+       (_protect_class_name): Call _default_format_protect_text directly.
+       (_default_format_navigation_panel):
+       Access 'formatting_function' hash instead of calling
+       'formatting_function' function.
+
 2022-06-04  Gavin Smith  <gavinsmith0123@gmail.com>
 
        * tp/Texinfo/Convert/HTML.pm (html_attribute_class):
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 2a3aced364..5619e91c59 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -201,7 +201,7 @@ sub html_attribute_class($$;$)
       $self->_collect_css_element_class("$element.$style_class");
     }
   }
-  my $class_str = join(' ', map {$self->_protect_class_name($_)} @$classes);
+  my $class_str = join(' ', map {_protect_class_name($self, $_)} @$classes);
   return "<$element class=\"$class_str\"$style";
 }
 
@@ -3407,7 +3407,8 @@ sub _default_format_navigation_panel($$$$;$)
     }
 
     my ($active, $passive, $need_delimiter)
-      = &{$self->formatting_function('format_button')}($self, $button);
+       = &{$self->{'formatting_function'}->{'format_button'}}($self, $button);
+      # = &{$self->formatting_function('format_button')}($self, $button);
     if ($self->get_conf('HEADER_IN_TABLE')) {
       if (defined($active)) {
         $result .= $active;
@@ -9868,7 +9869,9 @@ sub _protect_class_name($$)
   my $self = shift;
   my $class_name = shift;
   $class_name =~ s/[$characters_replaced_from_class_names]/-/g;
-  return &{$self->formatting_function('format_protect_text')}($self, 
$class_name);
+
+  return _default_format_protect_text($self, $class_name);
+  #return &{$self->formatting_function('format_protect_text')}($self, 
$class_name);
 }
 
 my $debug;  # whether to print debugging output



reply via email to

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