You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Stas Bekman <st...@stason.org> on 2002/12/16 14:21:34 UTC

When perl is not quite fast enough

While reading Mark Fowler excelent Perl Advent Calendar 
(http://www.perladvent.org/2002/) 6th entry: 
http://www.perladvent.org/2002/6th/, in the references section I've noticed a 
link to Nicolas Clark's notes from his YAPC::EU::2002 presentation, on how to 
make your perl code faster: http://www.ccl4.org/~nick/P/Fast_Enough/

It's a very good read, and very relevant to us mod_perl users, who always want 
to have their code run faster. I especially liked it since it's very concise 
and gives you ideas of areas to explore. Certain things Nicolas talks about 
are already covered in detail in the mod_perl documentation. BTW, most other 
things mentioned in his notes are in the performance section of our upcoming 
mod_perl book (ora promises to get the book on the shelves in feb-mar next year).

Me thinking to ask Nicolas to contribute these notes to our tutorial section
(http://perl.apache.org/docs/tutorials/) and if possible to add some more meat 
to the original notes. If you remember our evil plan was to host at 
perl.apache.org interesting tutorials, relevant to mod_perl developers, but 
which are of interest to non-mod_perl developers too, thus bringing them to 
our site and hopefully getting them interested in mod_perl. Nicolas's doc, 
looks like a good bite ;)

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: When perl is not quite fast enough

Posted by Joe Schaefer <jo...@sunstarsys.com>.
Stas Bekman <st...@stason.org> writes:
[...]

> Me thinking to ask Nicolas to contribute these notes to our tutorial
> section (http://perl.apache.org/docs/tutorials/) and if possible to
> add some more meat to the original notes. If you remember our evil
> plan was to host at perl.apache.org interesting tutorials, relevant to
> mod_perl developers, but which are of interest to non-mod_perl
> developers too, thus bringing them to our site and hopefully getting
> them interested in mod_perl. Nicolas's doc, looks like a good bite ;)

Great idea, Stas.  His comments definitely should be part of the 
mod_perl canon; those notes present *the right approach* to optimization.

-- 
Joe Schaefer

Re: When perl is not quite fast enough

Posted by do...@zsi.at.
Hi!

On Tue, Dec 17, 2002 at 08:32:01AM -0000, Jeff AA wrote:
>    - can folks name any specific useful intermediate/advanced
>      Perl lists? i.e. Perl 4+ years in a commercial env

What about perlmonks?

http://www.perlmonks.org


-- 
#!/usr/bin/perl                               http://domm.zsi.at
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}

Re: When perl is not quite fast enough

Posted by Stas Bekman <st...@stason.org>.
[apache.org keeps on timing out :( reposting 3rd time :(]

Jeff AA wrote:
  >>-----Original Message-----
  >>From: Stas Bekman [mailto:stas@stason.org]
  >>Sent: 16 December 2002 13:22
  >>To: modperl@perl.apache.org
  >>Subject: When perl is not quite fast enough
  >>
  >>
  >>While reading Mark Fowler excelent Perl Advent Calendar
  >>(http://www.perladvent.org/2002/) 6th entry:
  >>http://www.perladvent.org/2002/6th/, in the references
  >>section I've noticed a
  >>link to Nicolas Clark's notes from his YAPC::EU::2002
  >>presentation, on how to
  >>make your perl code faster: http://www.ccl4.org/~nick/P/Fast_Enough/
  >
  >
  > Dear ModPerl Lister,
  >
  > I have two questions:
  >
  > 1) In this list, I have seen folks asking general Perlish questions
  >    told to take their discussions elsewhere, along with the useless
  >    recommendation that they browse lists.perl.org - I have done this
  >    several times and joined a few of the lists, but only ever found
  >    lists that were rather beginner. I have also lurked in some of the
  >    groups.yahoo.com pearly lists without finding the right level.
  >
  >    - can folks name any specific useful intermediate/advanced
  >      Perl lists? i.e. Perl 4+ years in a commercial env

I think the comp.lang.perl.moderated newsgroup (and if not accepted by
the first, comp.lang.perl.misc) used to be the best resource to discuss
general perl things. It's been a while since I've last used it, so I'm
not sure if it's still a good resource. If others can confirm that it's
still useful, I'll add that resource to:
http://perl.apache.org/docs/offsite/other.html#Perl
If you know of other good resources for general perl discussions which
aren't already listed at lists.perl.org please let us know and we will
update that section.

It's probably a good idea to link from
http://perl.apache.org/help/index.html to
http://perl.apache.org/docs/offsite/other.html to help direct those
seeking help on other topics in the vicinity of mod_perl.


  > 2) I have one common approach to speed improvement that is not
  >    mentioned at all, to do with symbol table manipulation for
  >    functions, that I would like to polish via a list discussion
  >
  >    - is this list appropriate for a thread discussing Perlish
  >    performance in general? I would guess that symbol table fiddles
  >    might be risky in a mod_perlish env.

It sounds good to me if it helps other mod_perl users to improve their
code's performance.
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: When perl is not quite fast enough

Posted by Perrin Harkins <pe...@elem.com>.
Jeff AA wrote:
> I have two questions:
> 
> 1) In this list, I have seen folks asking general Perlish questions 
>    told to take their discussions elsewhere, along with the useless 
>    recommendation that they browse lists.perl.org - I have done this 
>    several times and joined a few of the lists, but only ever found 
>    lists that were rather beginner. I have also lurked in some of the 
>    groups.yahoo.com pearly lists without finding the right level.
> 
>    - can folks name any specific useful intermediate/advanced
>      Perl lists? i.e. Perl 4+ years in a commercial env

In addition to perlmonks.org, the usenet groups and IRC have the highest 
concentration of experienced Perl coders.

>    I would guess that symbol table fiddles
>    might be risky in a mod_perlish env.

No more so than any other place.  The biggest risk is that symbol table 
hacks are usually bizarre and hard to read.  The Apache::PerlRun module 
modifies the symbol table in order to reset globals, and I've done 
really simple things with it to automatically build accessor methods 
(which can be better than AUTOLOAD with mod_perl because of memory sharing).

- Perrin



RE: When perl is not quite fast enough

Posted by Jeff AA <ja...@aquabolt.com>.
> -----Original Message-----
> From: Stas Bekman [mailto:stas@stason.org] 
> Sent: 16 December 2002 13:22
> To: modperl@perl.apache.org
> Subject: When perl is not quite fast enough
> 
> 
> While reading Mark Fowler excelent Perl Advent Calendar 
> (http://www.perladvent.org/2002/) 6th entry: 
> http://www.perladvent.org/2002/6th/, in the references 
> section I've noticed a 
> link to Nicolas Clark's notes from his YAPC::EU::2002 
> presentation, on how to 
> make your perl code faster: http://www.ccl4.org/~nick/P/Fast_Enough/

Dear ModPerl Lister,

I have two questions:

1) In this list, I have seen folks asking general Perlish questions 
   told to take their discussions elsewhere, along with the useless 
   recommendation that they browse lists.perl.org - I have done this 
   several times and joined a few of the lists, but only ever found 
   lists that were rather beginner. I have also lurked in some of the 
   groups.yahoo.com pearly lists without finding the right level.

   - can folks name any specific useful intermediate/advanced
     Perl lists? i.e. Perl 4+ years in a commercial env
  

2) I have one common approach to speed improvement that is not
   mentioned at all, to do with symbol table manipulation for
   functions, that I would like to polish via a list discussion

   - is this list appropriate for a thread discussing Perlish
   performance in general? I would guess that symbol table fiddles
   might be risky in a mod_perlish env.

TIA
Jeff