Hi again, Yes, I actually did a use Devel::SawAmpersand and it didn't see any evil variables. (Currently, our code isn't using the English package.)
I ended up modifying our code so that it skips the regex I sent in my previous message on most requests. This circumvents the biggest part of our slow down, but it isn't completely solving the problem. We're still seeing code sluggishness on certain pages of our web app. The strange thing is that, in most cases, the same code runs as quickly as it did before our upgrade. It's just on a few pages of the web app that it slows down. We tried building Perl using Perl's malloc. Initial tests showed that this alleviated some of the memory bloating, but when we rebuilt some of our production web servers, the memory savings weren't realized. In fact, the Perls with -Dusemymalloc were using more memory. This, coupled with a warning in the Perl 5.8.3 INSTALL.Solaris file that said to never use -Dusemymalloc with gcc on Solaris after Perl 5.7 made us uncomfortable with this change, so we rolled it back. Devel::DProf and dprofpp were showing that some calls to CGI.pm were taking a good deal of time, so we're working on replacing them. This is not producing much of a speedup, however. We are also working to install the GTop module in our development environment. However, as we use Solaris, this is proving tricky because several prerequisite libraries are not present. (Thanks for helping my coworker, Peter Wood, with this, Stas.) Has anyone else successfully installed and used GTop on Solaris? We found most of these approaches by looking in Practical mod_perl and the mod_perl Developer's Cookbook. Are there any other suggestions that folks on the mailing list can offer us as we continue to troubleshoot this issue? Thanks again for your assistance. - Simon -----Original Message----- From: Stas Bekman [mailto:[EMAIL PROTECTED] Sent: Thursday, July 15, 2004 2:54 PM To: Simon Miner Cc: mod_perl Mailing List ([EMAIL PROTECTED]) Subject: Re: mod_perl regex conundrum Simon Miner wrote: > Thanks for the suggestion! > > Between sawampersand and grep'ing my code, I did find an instance of $&. I > removed it, but I am still seeing the problem. Did you actually use Devel::SawAmpersand to test it? There are other modules that pull those in, e.g. if you do 'use English'. > I have also noticed that the size of our mod_perl processes has doubled > since the upgrade (from ~50M to ~100M). Did Perl, Apache, and mod_perl > really get that much bigger between the versions I mentioned in my last > email? Perl is getting bigger all the time but definitely not by this amount. Use Apache::Status coupled with all the goodies it invokes (B::Size etc) to figure out who eats your memory. If you have your perl built with ithreads (to check run: perl -V:useithreads), recompile it to not enable those (unless you plan to use them). You will find quite a few other performance/memory usage related tips in the "Practical mod_perl" book [1]. Also in your original report, the example of using Time::HiRes is highly unreliable. You need to count CPU clocks, not wallclocks. Use Benchmark.pm instead. Also have you tried using some special purpose CPAN module to do the parsing for you? e.g. I remember Randal's WebTechniques articles [2] have plenty of examples of using modules like HTML::Filter, HTML::Tree, etc. [1] http://modperlbook.org/ [2] http://www.stonehenge.com/merlyn/WebTechniques/ -- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html