"... modules take a long time to initialize..."
Ja, ja or yes sure as you like. This is what common sense tells us.
But consider this funny little study i recently posted:
# app.psgi use strict; use warnings; use Plack::Request; use Plack::App::URLMap; use JSON::Tiny qw(encode_json); my $slash = sub { my $env = shift; my $json = encode_json {nose => 'cuke'}; my $status = 200; my $request = Plack::Request->new($env); my $headers = [ 'Content-Type' => 'application/json', 'Content-Length' => length $json, ]; my $body = [ $json ]; [ $status, $headers, $body ]; }; my $urlmap = Plack::App::URLMap->new; $urlmap->mount( "/" => $slash ); my $app = $urlmap->to_app; __END__
Preloading the Plack stuff? JSON::Tiny might be cheap but who knows.
It is really difficult to find answers for these questions.
And what if i daemonize Starman? The switches for this task are confusing.
Thanks for your kind reply and best regards, Karl.
P.S.: I asked the author. Probably he will enlight us.
«The Crux of the Biscuit is the Apostrophe»
In reply to Re^2: When does it make sense to preload modules when starting Starman?
by karlgoethebier
in thread When does it make sense to preload modules when starting Starman?
by karlgoethebier
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |