On Tue, 6 Jun 2000, ___cliff rayman___ wrote:
here is something posted to p5p today.
looks like a good place to start Stas's challenge.
Benjamin Elijah Griffin wrote:
In alt.hackers a while ago I saw this .sig:
#!/usr/bin/perl
$j=\$j;{$_=unpack(P25,pack(L,$j));/Just Another Perl
At 11:45 AM 6/7/00 +0300, Stas Bekman wrote:
On Tue, 6 Jun 2000, ___cliff rayman___ wrote:
here is something posted to p5p today.
looks like a good place to start Stas's challenge.
Benjamin Elijah Griffin wrote:
In alt.hackers a while ago I saw this .sig:
#!/usr/bin/perl
Gunther Birznieks wrote:
snip
From: Jan Dubois [EMAIL PROTECTED]
I don't think so. You should never let people execute arbitrary code on
your web server anyways. If you do, then the potential intruder can do
much more nasty things than just snooping around in memory.
-Jan
I think Jan is
it would seem to be quite straight forward to implement a handler to gzip
all output html files depending on the allowed mime-types and/or user_agent.
This would reduce many pages by up to a factor of 10 in size.
1) Is anyone already doing?
2) If not why not?
3) what borwsers would accept html
On Wed, 7 Jun 2000, Mark Hewis wrote:
it would seem to be quite straight forward to implement a handler to gzip
all output html files depending on the allowed mime-types and/or user_agent.
This would reduce many pages by up to a factor of 10 in size.
1) Is anyone already doing?
2) If not
OK, I'm new to all this, and it's by a sheer miracle that I've compiled Perl
5.6, Apache mod_perl on my BSDI 4.1 box. I may be using completely the
wrong terminology, so please bear with me !
I'm running lots of scripts under Apache::PerlRun, migrating the scripts one
at a time to run in
Yes you get the benefit of shared modules. PerlRun only differs from
registry in the sense that it clears out the namespace of the main script.
As for leaking memory like a sieve? That is not unexpected with PerlRun
scripts because they are typically not coded cleanly. Hell, even our 6 year
Here is another freshly squeezed^H^H^H^H^H^H^H^Hmade benchmark with
comments :)
=head2 Reducing the Number of stat() Calls Made by Apache
If you watch the system calls that your mod_perl server makes (using
Itruss or Istrace depending on your OS), while processing a
request, you will notice
Thanks for the response Gunther,
I'll look into running seperate servers.
I'm now preloading CGI DBI and memory APPEARS to be gobbled a lot slower
now. Which is nice.
Does DBI automatically pull in DBD, or should I preload Apache:DBD also ?
On Wed, 7 Jun 2000, David Brown wrote:
Thanks for the response Gunther,
I'll look into running seperate servers.
I'm now preloading CGI DBI and memory APPEARS to be gobbled a lot slower
now. Which is nice.
I can see a rain of questions coming :)
David, please read the guide and other
Hello all,
I just joined the list the other day and have some questions about
internal and external Perl interpretors for Apache. Forgive my lack of
knowledge, but I am assuming that mod_perl is the Perl interpretor that
runs internally to Apache and starts when Apache starts. The external
On Wed, 7 Jun 2000, Rich Lemanski wrote:
Hello all,
I just joined the list the other day and have some questions about
internal and external Perl interpretors for Apache. Forgive my lack of
knowledge, but I am assuming that mod_perl is the Perl interpretor that
runs internally to Apache
Following Tim's comments here is the new benchmark. (I'll address the
buffering issue in another post)
use Benchmark;
use Symbol;
my $fh = gensym;
open $fh, "/dev/null" or die;
sub multi_print{
print $fh "!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\"";
print $fh "HTML";
On Wed, 7 Jun 2000, Stas Bekman wrote:
Following Tim's comments here is the new benchmark. (I'll address the
buffering issue in another post)
use Benchmark;
use Symbol;
my $fh = gensym;
open $fh, "/dev/null" or die;
sub multi_print{
print $fh "!DOCTYPE HTML PUBLIC
[benchmark code snipped]
single_print: 4 wallclock secs ( 2.28 usr + 0.47 sys = 2.75 CPU)
here_print:2 wallclock secs ( 2.45 usr + 0.45 sys = 2.90 CPU)
list_print:7 wallclock secs ( 7.17 usr + 0.45 sys = 7.62 CPU)
multi_print: 23 wallclock secs (17.52 usr + 5.72
So if you want a better performance, you know what technique to use.
I think this last line is misleading. The reality is that you're doing
500,000 iterations here. Even for the worst case scenario of multi_print
with no buffering you're managing nearly 22,000 outputs a second. Now
Eric Cholet wrote:
Of course the slowest stuff should be optimized first...
Right. Which means the Guide, if it is not already so doing, ought to
rank-order the optimizations in their order of importance, or better, their
relative importance. This one, it appears, should be near the bottom
On Wed, 7 Jun 2000, Eric Cholet wrote:
So if you want a better performance, you know what technique to use.
I think this last line is misleading. The reality is that you're doing
500,000 iterations here. Even for the worst case scenario of multi_print
with no buffering you're managing
From: "Eric Strovink" [EMAIL PROTECTED]
Of course the slowest stuff should be optimized first...
Right. Which means the Guide, if it is not already so doing, ought to
rank-order the optimizations in their order of importance, or better,
their
relative importance. This one, it appears,
apachetoday.com was launched sometime last week (I think), and today
features Stas and mod_perl on the front page :)
--Geoff
On Wed, 7 Jun 2000, Eric Cholet wrote:
This said, i hurry back to s/"constant strings"/'constant strings'/g;
Those two are equal.
--
Matt/
Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy
How do I make it so when it sees the extension .asp it does the asp thing?
instead of putting this
Location /asp/
SetHandler perl-script
PerlHandler Apache::ASP
PerlSetVar Global /tmp
/Location
yeah - but why the young guy's picture next to Stas's column.
i have him pictured as middle forties, slightly overweight, with grey
flecks in his black hair.
time for a picture change.
Geoffrey Young wrote:
apachetoday.com was launched sometime last week (I think), and today
features Stas
Clement Law wrote:
How do I make it so when it sees the extension .asp it does the asp thing?
instead of putting this
Location /asp/
SetHandler perl-script
PerlHandler Apache::ASP
PerlSetVar Global /tmp
/Location
The .htaccess file which activates the sample files
in the distribution's
well, I don't use Apache::ASP, but a quick glance of the README yielded the
apropriate instructions you are looking for...
:)
--Geoff
-Original Message-
From: Clement Law [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 07, 2000 1:54 PM
To: [EMAIL PROTECTED]
Subject: Apache::ASP
yeah - but why the young guy's picture next to Stas's column.
i have him pictured as middle forties, slightly overweight, with grey
flecks in his black hair.
time for a picture change.
Come'n Cliff, I'm only 26!!! The picture is about 3 years old.
I don't have any grey flecks, as of
Eric Cholet wrote:
These
things add up, so don't you think that whatever can be optimized, should ?
Wrong question, IMHO: it's what you optimize for that counts. Several things
come to mind that are often more important than performance and often mean not
optimizing for performance (these
"Mercer, Ty" wrote:
How would one go about adding the Apache::ASP function to the virtual hosts?
I have the defunct ASP setting in my httpd.conf file and it works fine for
the default site, but nothing for any of the virtuals.
Need more specifics?
Any info is better than what I have,
He Ding wrote:
[Sun Jun 4 15:15:12 2000] [error] Undefined subroutine
Apache::Symbol::undef called at
/usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line 1103.
[Sun Jun 4 15:15:12 2000] [error] [asp] [937] [debug] destroying - asp:
Apache::ASP=HASH(0x8f6c8e4);
Eric He
You should not be
I don't understand what you're getting at. Does this mean that something
shouldn't be optimized because there's something else in the process that
is taking more time? For example I have a database powered site, the slowest
part of request processing is fetching data from the database.
These
things add up, so don't you think that whatever can be optimized, should
?
Wrong question, IMHO: it's what you optimize for that counts. Several
things
come to mind that are often more important than performance and often mean
not
optimizing for performance (these are interrelated,
On Wed, 7 Jun 2000, Jeff Norman wrote:
Frequently, it's hard to build up an entire output segment without
code in-between the different additions to the output. I guess you could
call this the "append, append, append... output" technique.
I think it would be an interesting addition to
Frequently, it's hard to build up an entire output segment without
code in-between the different additions to the output. I guess you could
call this the "append, append, append... output" technique.
I think it would be an interesting addition to the benchmark:
sub gather_print{
my
Stas Bekman wrote:
Per your request:
The handler:
query | avtime completed failedrps
---
single_print |110 5000 0881
here_print|111 5000 0881
list_print|111 5000 0
On Wed, 7 Jun 2000, Stas Bekman wrote:
And the results are:
single_print: 1 wallclock secs ( 1.74 usr + 0.05 sys = 1.79 CPU)
here_print:3 wallclock secs ( 1.79 usr + 0.07 sys = 1.86 CPU)
list_print:7 wallclock secs ( 6.57 usr + 0.01 sys = 6.58 CPU)
multi_print: 10
Folks, all the benchmarks and conclusions that I post are not coming as a
bite flame. Let me summarize it in two words:
I want people to be able to optimize their code when they want to. I
just show how to do it and what are the good places to look at.
If you don't want/need to optimize,
On Wed, 7 Jun 2000, ___cliff rayman___ wrote:
Stas Bekman wrote:
Per your request:
The handler:
query | avtime completed failedrps
---
single_print |110 5000 0881
here_print|111
FYI
-- Forwarded message --
Date: Wed, 07 Jun 2000 15:24:42 -0400
From: Rodent of Unusual Size [EMAIL PROTECTED]
To: ApacheCon Announcements [EMAIL PROTECTED],
Apache Announcements [EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL
I am using RH 6.2, mod-perl 1.24, apache 1.3.12 with the following
program with Apache/registry:
#!/usr/bin/perl -w
use strict;
my $p = new xyz;
for(my $i=0; $i 10; ++$i) {
for(my $j=1;$j100;++$j) {
my $file = "../xml/$j.xml";
my $t = $p - loadxml($file);
}
}
print
.--[ Jeff Norman wrote (2000/06/07 at 14:27:29) ]--
|
| Frequently, it's hard to build up an entire output segment without
| code in-between the different additions to the output. I guess you could
| call this the "append, append, append... output" technique.
|
| I think it
Ok, you'd get surprised on this one. I cannot make benchmark show me
unbuffered output worse than buffered. Anyone can tell me why? there is
ap_flash call after each print in the unbuffered case, how comes the
results are the same?
name | avtime completed failedrps
On Wed, 7 Jun 2000, Matt Sergeant wrote:
On Wed, 7 Jun 2000, Eric Cholet wrote:
This said, i hurry back to s/"constant strings"/'constant strings'/g;
Those two are equal.
Yes, although it's counter-intutive there's no real performance hit
from double-quoting constant strings.
The one
What about heredoc with the magical @{} technique for interpolating
functions?
or Text::iPerl ? I'd be interested in knwing how they stack up
o _
/|/ | Jerrad Pierce \ | __|_ _|
/||/ http://pthbb.org . | _| |
\|| _.-~-._.-~-._.-~-._@"
What the other programmer here and I do is setup an array and push()
our lines of output onto it throughout all our code, and print it at
the very end. I'd be interested in seeing benchmarks of this vs.
the other methods. I'll try to find the time to run them.
handler:
You might remember the 'Bizarre copy of HASH in aassign' when using
CGI::Carp I posted a workaround for... Here's an update from Perl 5
Porters--it's being fixed in the next release:
- Original message -
From: Gurusamy Sarathy [EMAIL PROTECTED]
To: Jeremy Howard [EMAIL PROTECTED]
Date:
[EMAIL PROTECTED] (Stas Bekman) wrote:
On Wed, 7 Jun 2000, Mark Hewis wrote:
it would seem to be quite straight forward to implement a handler to gzip
all output html files depending on the allowed mime-types and/or user_agent.
This would reduce many pages by up to a factor of 10 in size.
On Wed, 7 Jun 2000, Ken Williams wrote:
[EMAIL PROTECTED] (Stas Bekman) wrote:
On Wed, 7 Jun 2000, Mark Hewis wrote:
it would seem to be quite straight forward to implement a handler to gzip
all output html files depending on the allowed mime-types and/or user_agent.
This would
hello,
first let me apologise for jst jumping straight into asking
questions on the mailing list, but this is really puzzling me. First
some background.
I have been using perl for the past 3 years. I think (note
+think+) that I understand perl quite well, so when the job came up
mod_perl Guide Version 1.24 Jun 7, 2000 has been released.
The online version:
http://perl.apache.org/guide/
The PDF version: 631pages (1,810KB compressed)
http://perl.apache.org/guide/mod_perl_guide.pdf.gz
The sources at CPAN:
file:
Hello, all
I have a very simple problem for which I am sure (hope) there is a very
simple solution.
I basically want to pipe cgi output to mod_include or rather the
equivalent mod_perl module, Apache::SSI.
I do not want to make the cgis mod_perl modules nor Apache::Registery
scripts. Just want
I get a 500 Internal Server Error when I try to run a ASP file.
I'm using Windows NT Server. And the webserver I'm using is Apache V1.3.12
with Mod_perl
Perl: c:\usr\perl\bin
ASP.PM: c:\usr\perl\site\lib\apache\asp.pm
Other: c:\usr\perl\lib
I'm using Virtual Hosts in Apache too.
I have no clue
Hi Everybody:
I got big problems. Same query and same script. Sometimes it works fine
but sometimes i get the following
errors (i am so frustrated, have no idea what i need to do):
DBD::mysql::db do failed: MySQL server has gone away at cnznetmod.pm
line 151.
DBD::mysql::st execute failed:
i've never used Apache::Asp, but i thought it was used to embed perl using asp
constructs. what you have looks like visual basic which is microsoft ONLY
stuff. it should say this in the intro to the docs somewhere.
--
___cliff [EMAIL PROTECTED]
Clement Law wrote:
I get a 500 Internal
I get a 500 Internal Server Error when I try to run a ASP file.
I'm using Windows NT Server. And the webserver I'm using is Apache V1.3.12
with Mod_perl
Perl: c:\usr\perl\bin
ASP.PM: c:\usr\perl\site\lib\apache\asp.pm
Other: c:\usr\perl\lib
I'm using Virtual Hosts in Apache too.
I have no clue
This is notify you that Randy's guide search engine's content is up to
date, and Vivek's version is almost up-todate, so you can use both now.
Enjoy!
_
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
When processing the url
http://biodoc.ch/de/search?query=%2Btest+%2Bdna+-xyz ,
$cgi-param('query') correctly returns '+test +dna -xyz'.
But if I use http://biodoc.ch/de/search;query=%2Btest+%2Bdna+-xyz
instead, I get ' test dna -xyz'. If I include a %3F (=?) in the url,
I even get a 404 error.
56 matches
Mail list logo