gregorovius has asked for the wisdom of the Perl Monks concerning the following question:
If I can get rid of the uudecode time this technique would buy me a speedup of 20x, since the alternative (regenerating objects each time from a database) takes <emph>very</emph> long.
Should I hack into Storable and make it freeze to 7 bit characters? (please see testcase at bottom)
I am experiencing these woes in part because I was expecting Perscript on IIS to cache pre-compiled scripts and module data in memory, like mod_perl does, but is not the case. (I've also tried ActiveState's PerlEx, but stumbled upon rock trying to make it stop generating headers automatically (so cookies can be sent to clients) and support for fixing this form ActiveState was close to nil). Thanks in advance!
<%@ Language=PerlScript %> <% use Storable qw(freeze thaw); use Convert::UU qw(uuencode uudecode); my %h = (llave1=>'valor1', llave2=>{llave3=>'valor3'}); my $h_froz = freeze \%h; $main::Application->Contents->SetProperty('Item', 'prueba_app', $h_froz ); my $h_recup = $main::Application->Contents('prueba_app'); $result = 'RESULTS:'; foreach(0 .. length $h_con) { my $ch1 = substr $h_con, $_, 1; my $ch2 = substr $h_recup, $_, 1; if (ord($ch1) == ord($ch2)) { $result .= "$_ SAME " . ord $ch1; } else { $result .= "$_ DIFFERENT " . ord ($ch1) . '-' . ord ($ch2); } $result .= '<BR>'; } %> <html> <body> result: <%= $result %> </body> </html>
|
---|
Replies are listed 'Best First'. | |
---|---|
(tye)Re: ASP and Storable woes
by tye (Sage) on Sep 29, 2000 at 08:19 UTC | |
(dchetlin: Data::Dumper) Re: ASP and Storable woes
by dchetlin (Friar) on Sep 29, 2000 at 06:49 UTC | |
by gregorovius (Friar) on Sep 29, 2000 at 09:49 UTC | |
by princepawn (Parson) on Sep 29, 2000 at 12:59 UTC | |
by dchetlin (Friar) on Sep 29, 2000 at 13:19 UTC | |
Re: ASP and Storable woes
by gregorovius (Friar) on Sep 29, 2000 at 12:25 UTC |