RSS | Module Info | Add a review of Syntax-Highlight-Engine-Kate

3 out of 3 found this review helpful:

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.

Jonathan T. Rockway - 2007-01-25 15:14:35
Was this review helpful to you?  Yes No

8 out of 8 found this review helpful:

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

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

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;

Output:

Bench: 0.039220
Bench: 0.507489

Burak Gursoy - 2006-05-30 09:01:24
Was this review helpful to you?  Yes No

6 out of 9 found this review helpful:

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

Great job! I might even throw away my own perl hilighter.

nadim khemir NKH - 2006-05-30 00:43:04
Was this review helpful to you?  Yes No


the camel