Syntax-Highlight-Engine-Kate reviews

RSS | Module Info

Syntax-Highlight-Engine-Kate (0.07) *

Highlighter engine doesn't seem updated (for example, defined-or is not yet interpreted correctly by this module but already correctly by Kate itself). Does not provide default theme (must specify all colors). Seem to be very slow (takes 1.5s for a 18K Perl .pm file while Pygments only takes 0.2s).

Syntax-Highlight-Engine-Kate (0.02) *****

Great module. I've been wanting to add syntax highlighting support to my blog software, but didn't want to require the end user to have vim installed. This module works much better (and faster) than Text::VimColor, and supports many more languages. The only disadvantage is that there's no reasonable default color scheme, you have to build it all yourself. Small price to pay for a great highlighting engine, though. Highly recommended.

Syntax-Highlight-Engine-Kate (0.01) ****

Nice. But there is a performance problem. loads all sub modules at once and this decreases performance and increases exec time. We can not use individual modules ( for highlighting, since the highlightText() method is inside

I think that all methods must be moved inside another module (like Syntax::Highlight::Engine::Kate::Base) and all sub modules must inherit from this. And Syntax::Highlight::Engine::Kate must be just remain as a wrapper. Here is a little benchmark I did:

#!/usr/bin/perl -w

use strict;

use Time::HiRes qw(time);

my $bench = time;

require Syntax::Highlight::Engine::Kate::Perl;

import Syntax::Highlight::Engine::Kate::Perl;

printf "Bench: %4f\n", time - $bench;

my $bench2 = time;

require Syntax::Highlight::Engine::Kate;

import Syntax::Highlight::Engine::Kate;

printf "Bench: %4f\n", time - $bench2;


Bench: 0.039220
Bench: 0.507489

Syntax-Highlight-Engine-Kate (0.01) *****

Great job! I might even throw away my own perl hilighter.
1 hidden unhelpful review