Hi all,
Why dancer on starman becomes very slow? Am I doing something wrong?
#### directly starman
$ cat app.psgi
my $app = sub {
return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello World' ] ];
};
$ starman &
$ ab gives me 4000 reqs/second
#### directly dancer
$ cat app.pl
#!/usr/bin/env perl
use Dancer;
get '/' => sub { "Hello World!" };
dance;
$ perl app.pl &
$ ab gives me 600 reqs/second
#### dancer on starman
$ starman app.pl &
$ ab still gives me 600 reqs/second
Why so slow?
Is it possible let dancer deal with HTML request, and starman deal with non-HTML request directly?