perl data to JSON & javascript JSON to perl data back again.
Saying that the over all speed is acceptable and you can take some steps to
improve speed like
=over 4
=item L<JSON::XS>
Make
sure you have L<JSON::XS> installed - this is important, JavaScript::Shell
uses JSON::Any to parse data and it will use any available JSON parser
but if you have JSON::XS installed in your system i
t will use it by default as
it's the fastest JSON parser available
=item Data Transfer
Try to transfer small data chunks between processes when possible, sending
large data will be very slow
l;
use strict;
use warnings;
use utf8;
use FindBin qw($Bin);
use File::Spec;
use Carp;
use JSON::XS;
use IPC::Open2;
our $VERSION = '0.02';
#=================================================
bin";
my $self = bless({
running => 0,
_path => $path,
_json => JSON::XS->new,
_ErrorHandle => $opt->{onError},
_js => $js,
pid => $$
{_path} }
sub json { shift->{_json} }
sub toJson { shift->{_json}->encode(@_) }
sub toObject { shift->{_json}->decode(@_) }
sub context