On Jun 21, 3:40 pm, Martin <[email protected]> wrote:
> On Jun 21, 8:42 am, Martin <[email protected]> wrote:
>
>
>
> > On Jun 19, 7:37 pm, Tim Bunce <[email protected]> wrote:
>
> > > On Fri, Jun 18, 2010 at 08:39:47AM -0700, Martin wrote:
> > > > perl -V for broken case:
>
> > > > -DDEBUGGING=-g -Doptimize=-O2
>
> > > That's a curious configuration.
>
> > Not sure where it came from on this machine - it may be as installed
> > by Ubuntu. The newer 5.10.1 was built by me using all defaults.
>
> > > On the plus side it does mean the binary
> > > will have symbols. So you could use a sampling profiler[1]to probe where
> > > perl is spending its time.
>
> > > Tim.
>
> > > [1] Likehttp://oprofile.sourceforge.net/about/
>
> > I'll look in to that.
>
> > So far I have been unable to reproduce this is a smaller test case but
> > I am continuing to try.
>
> > Martin
>
> OK, I've found the problem and it has nothing to Perl versions. It is
> taint checking. The one that was taking ages was running with -t from
> init and I forgot that and I was running it manually without -t.
>
> Now I am even more suspicious of the concatentation line rather than
> the ref(x) line taking the time. Since Tim found a line was taking
> more and more ticks and the concatenation adds 4K each time to 32Mb it
> almost sounds like taint checking is expensive and doing something
> every time a chunk is added to the string.
>
> I'm very sorry I forgot about taint checking. This is the second issue
> we've found like this. I'm really going off taint mode quickly.

Just for reference the first issue was 
http://rt.perl.org/rt3/Public/Bug/Display.html?id=27344
which was just recently (in March this year) fixed in 5.12.

> I can now reproduce with this:
>
> create a file.dat file in your apache htdocs and make it around 32Mb
> in size then run this:
>
> use LWP::UserAgent;
> use HTTP::Request;
>
> my $ua = LWP::UserAgent->new();
> $get = HTTP::Request->new('GET', 'http://localhost/file.dat');
> my $r = $ua->request($get);
> print length($r->decoded_content);
>
> with and without taint checking. I should also add our Apache
> returns .dat files as UTF-8 encoded.
>
> Is this something I should report elsewhere?
>
> Martin

-- 
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.

Group hosted at:  http://groups.google.com/group/develnytprof-dev
Project hosted at:  http://perl-devel-nytprof.googlecode.com
CPAN distribution:  http://search.cpan.org/dist/Devel-NYTProf

To post, email:  [email protected]
To unsubscribe, email:  [email protected]

Reply via email to