You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Carwheel, Dan" <da...@isinet.com> on 2002/07/16 16:47:28 UTC

Purify, Perl and mod_perl

I've looked at Rational's Purify:

	http://www.rational.com/products/purify_unix/index.jsp, 

and although their web page says only works for C, C++, Java and a few
others, I've seen this page:

	http://www.perlpod.com/stable/perlhack.html 

on getting Perl work with with Purify.

My question is this...can I run my application using this purified perl
under mod_perl to track down potential memory leaks and other problems? Are
there any issues with running Perl for testing with Purify on a mod_perl
enabled webserver? 

Thanks for the advice.

--Dan

Re: Purify, Perl and mod_perl

Posted by Stas Bekman <st...@stason.org>.
Perrin Harkins wrote:
[...]
>> My question is this...can I run my application using this purified perl
>> under mod_perl to track down potential memory leaks and other problems?
> 
> 
> You probably don't have any memory leaks.  Most things that people refer 
> to as leaks are just normal growth.  A leak is when an area of memory 
> gets "lost" because the program that allocated it forgets to free it.

or cannot free it because of the closure or a circular reference, which 
seems to be the case with the bug in Apache::Request reported by Dave 
Rolsky.

  [...]

> A number of the most common sources of memory growth are explained in 
> the guide: 
> http://perl.apache.org/docs/1.0/guide/performance.html#Improving_Performance_by_Prevention 

Plus Apache::Leak, whose reports should be carefully analyzed because 
not everything that it reports as a leak is actually a leak:
http://perl.apache.org/docs/1.0/guide/debug.html#How_can_I_find_out_if_a_mod_perl_code_has_a_memory_leak

__________________________________________________________________
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: New mod_perl site and oddness with IE

Posted by Steve Piner <st...@marketview.co.nz>.

Stas Bekman wrote:
> 
> Jim Helm wrote:
> > Has anyone else had problems with this particular page under IE
> > (6.0.2600 under XP) being extremly slow to update when paging up/down?
> > It works fine under Mozilla, and it's not a memory or cpu issue (checked
> > with task manager already). And when I say slow, I mean a simple down
> > cursor causes the visible portion of the page to get painted in 4
> > noticble steps/chunks.
> >
> > An older version I tracked down with Google
> > (http://www.apache.jp/perl/guide/performance.html) which is also 300K+
> > doesn't have the same problem - just to show that it's not purely the
> > raw size of the page that is the problem.
> >
> > Just a little feedback for the new site (which is great, btw).  If it's
> > just me with the problem, I'll go find a rock to hide under. :)
> 
> Is the size of the page causes the trouble? I don't have IE to try so
> hopefully someone will help us out here. What happens if you shorten the
> content of the page?
> 
> My guess is that IE simply cannot cope with a long page and the current
> complex stylesheet (because as say it works fine with the same page and
> a simpler stylesheet, which includes no layout instructions).
> Suggestions on how to fix that are welcome.

IE 5.50.4807.2300 (SP2) on Win98SE

I had different problems - the first time I went to the page, IE crashed
my machine, so I had to reboot.

After I'd rebooted I went back to the page. I got the extremely slow
scrolling, but, more significantly, I got the second half of the page
overlaid on top of the first half.

I grabbed a copy of the page with Opera's 'save with images' option
(strangely enough doing it with IE, and viewing the result didn't get
the same display) and verified that the bug occurred with my local copy.

I then had a bit of a fiddle with the stylesheet, and discovered that
taking out the 'position: relative's seemed to stop the overlay,
improving IEs performance markedly without affecting the page layout in
any of the browsers I have installed (Netscape 4.79, Mozilla 2002053012,
Opera 6.04)

(There was no reason *why* taking out the 'position: relative's should
work - it just struck me as the first thing that wasn't necessary in the
style sheet. Possibly irritating an IE bug just a little too much)

Hope this helps,

Steve

-- 
Steve Piner
Web Applications Developer
Marketview Limited
http://www.marketview.co.nz

Re: New mod_perl site and oddness with IE

Posted by Stas Bekman <st...@stason.org>.
Jim Helm wrote:
> Has anyone else had problems with this particular page under IE
> (6.0.2600 under XP) being extremly slow to update when paging up/down?
> It works fine under Mozilla, and it's not a memory or cpu issue (checked
> with task manager already). And when I say slow, I mean a simple down
> cursor causes the visible portion of the page to get painted in 4
> noticble steps/chunks.
> 
> An older version I tracked down with Google
> (http://www.apache.jp/perl/guide/performance.html) which is also 300K+
> doesn't have the same problem - just to show that it's not purely the
> raw size of the page that is the problem.
> 
> Just a little feedback for the new site (which is great, btw).  If it's
> just me with the problem, I'll go find a rock to hide under. :)

Is the size of the page causes the trouble? I don't have IE to try so 
hopefully someone will help us out here. What happens if you shorten the 
content of the page?

My guess is that IE simply cannot cope with a long page and the current 
complex stylesheet (because as say it works fine with the same page and 
a simpler stylesheet, which includes no layout instructions). 
Suggestions on how to fix that are welcome.

__________________________________________________________________
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: New mod_perl site and oddness with IE

Posted by Issac Goldstand <ma...@beamartyr.net>.
No problem in MSIE 6 - XP

  Issac

----- Original Message -----
From: "allan juul" <la...@inet.uni2.dk>
To: "Jim Helm" <jj...@att.net>
Cc: "'Perrin Harkins'" <pe...@elem.com>; <mo...@perl.apache.org>
Sent: Wednesday, July 17, 2002 10:46 AM
Subject: Re: New mod_perl site and oddness with IE


> Quoting Jim Helm <jj...@att.net>:
>
> > Has anyone else had problems with this particular page under IE
> > (6.0.2600 under XP) being extremly slow to update when paging up/down?
> > It works fine under Mozilla, and it's not a memory or cpu issue (checked
> > with task manager already). And when I say slow, I mean a simple down
> > cursor causes the visible portion of the page to get painted in 4
> > noticble steps/chunks.
> > --Jim
>
>
> please check if the problem exists on this url:
>
>
http://www.bullitt.suite.dk/clean3/dst_html/docs/1.0/guide/performance.html
>
> if you have other browser software, please check and see if anything else
is
> broken there as well.
>
> thanks a lot!
>
> /allan
>


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org


Re: New mod_perl site and oddness with IE

Posted by Steve Piner <st...@marketview.co.nz>.

allan juul wrote:
> 
> Quoting Jim Helm <jj...@att.net>:
> 
> > Has anyone else had problems with this particular page under IE
> > (6.0.2600 under XP) being extremly slow to update when paging up/down?
> > It works fine under Mozilla, and it's not a memory or cpu issue (checked
> > with task manager already). And when I say slow, I mean a simple down
> > cursor causes the visible portion of the page to get painted in 4
> > noticble steps/chunks.
> > --Jim
> 
> please check if the problem exists on this url:
> 
> http://www.bullitt.suite.dk/clean3/dst_html/docs/1.0/guide/performance.html
> 
> if you have other browser software, please check and see if anything else is
> broken there as well.
> 
> thanks a lot!
> 
> /allan

Looks good to me with  on Win98SE
  * IE 5.50.4807.2300 (SP2)
  * Netscape 4.79
  * Mozilla 2002053012
  * Opera 6.04

-- 
Steve Piner
Web Applications Developer
Marketview Limited
http://www.marketview.co.nz

Re: New mod_perl site and oddness with IE

Posted by Stas Bekman <st...@stason.org>.
[Let's move this thread to the docs-dev list, otherwise we make an OT 
noise at the modperl list, so, please, when replying to this email, 
remove the modperl address from it. thanks!]

>>Has anyone else had problems with this particular page under IE
>>(6.0.2600 under XP) being extremly slow to update when paging up/down?
>>It works fine under Mozilla, and it's not a memory or cpu issue (checked
>>with task manager already). And when I say slow, I mean a simple down
>>cursor causes the visible portion of the page to get painted in 4
>>noticble steps/chunks.
>>--Jim 
> 
> 
> 
> please check if the problem exists on this url:
> 
> http://www.bullitt.suite.dk/clean3/dst_html/docs/1.0/guide/performance.html
> 
> if you have other browser software, please check and see if anything else is 
> broken there as well.

Allan, You are trying to solve it by applying HTML::Clean, which reduces 
the size of the page, right? But even if it does solve the problem for 
this particular page, what happens if the page grows, or there is some 
other page which is bigger, and no cleanup will make it small enough to 
make IE happy.


__________________________________________________________________
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: New mod_perl site and oddness with IE

Posted by Stas Bekman <st...@stason.org>.
[Let's move this thread to the docs-dev list, otherwise we make an OT 
noise at the modperl list, so, please, when replying to this email, 
remove the modperl address from it. thanks!]

>>Has anyone else had problems with this particular page under IE
>>(6.0.2600 under XP) being extremly slow to update when paging up/down?
>>It works fine under Mozilla, and it's not a memory or cpu issue (checked
>>with task manager already). And when I say slow, I mean a simple down
>>cursor causes the visible portion of the page to get painted in 4
>>noticble steps/chunks.
>>--Jim 
> 
> 
> 
> please check if the problem exists on this url:
> 
> http://www.bullitt.suite.dk/clean3/dst_html/docs/1.0/guide/performance.html
> 
> if you have other browser software, please check and see if anything else is 
> broken there as well.

Allan, You are trying to solve it by applying HTML::Clean, which reduces 
the size of the page, right? But even if it does solve the problem for 
this particular page, what happens if the page grows, or there is some 
other page which is bigger, and no cleanup will make it small enough to 
make IE happy.


__________________________________________________________________
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


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org


Re: New mod_perl site and oddness with IE

Posted by allan juul <la...@inet.uni2.dk>.
Quoting Jim Helm <jj...@att.net>:

> Has anyone else had problems with this particular page under IE
> (6.0.2600 under XP) being extremly slow to update when paging up/down?
> It works fine under Mozilla, and it's not a memory or cpu issue (checked
> with task manager already). And when I say slow, I mean a simple down
> cursor causes the visible portion of the page to get painted in 4
> noticble steps/chunks.
> --Jim 


please check if the problem exists on this url:

http://www.bullitt.suite.dk/clean3/dst_html/docs/1.0/guide/performance.html

if you have other browser software, please check and see if anything else is 
broken there as well.

thanks a lot!

/allan

RE: New mod_perl site and oddness with IE

Posted by Randy Harmon <rj...@fortheweb.com>.
IE 5.5 on win2k as well.

> -----Original Message-----
> From: Issac Goldstand [mailto:margol@beamartyr.net]

> Not just you.  I have the same problem under MSIE.

> > Has anyone else had problems with this particular page under IE
> > (6.0.2600 under XP) being extremly slow to update when paging up/down?

http://perl.apache.org/docs/1.0/guide/performance.html#Improving_Perform



Re: New mod_perl site and oddness with IE

Posted by Issac Goldstand <ma...@beamartyr.net>.
Not just you.  I have the same problem under MSIE.

  Issac

----- Original Message ----- 
From: "Jim Helm" <jj...@att.net>
To: "'Perrin Harkins'" <pe...@elem.com>
Cc: <mo...@perl.apache.org>
Sent: Wednesday, July 17, 2002 8:23 AM
Subject: New mod_perl site and oddness with IE


> Has anyone else had problems with this particular page under IE
> (6.0.2600 under XP) being extremly slow to update when paging up/down?
> It works fine under Mozilla, and it's not a memory or cpu issue (checked
> with task manager already). And when I say slow, I mean a simple down
> cursor causes the visible portion of the page to get painted in 4
> noticble steps/chunks.
> 
> An older version I tracked down with Google
> (http://www.apache.jp/perl/guide/performance.html) which is also 300K+
> doesn't have the same problem - just to show that it's not purely the
> raw size of the page that is the problem.
> 
> Just a little feedback for the new site (which is great, btw).  If it's
> just me with the problem, I'll go find a rock to hide under. :)
> 
> --Jim 
> 
> > A number of the most common sources of memory growth are explained in 
> > the guide: 
> >
> http://perl.apache.org/docs/1.0/guide/performance.html#Improving_Perform
> ance_by_Prevention
> >
> > - Perrin
> 
> 


New mod_perl site and oddness with IE

Posted by Jim Helm <jj...@att.net>.
Has anyone else had problems with this particular page under IE
(6.0.2600 under XP) being extremly slow to update when paging up/down?
It works fine under Mozilla, and it's not a memory or cpu issue (checked
with task manager already). And when I say slow, I mean a simple down
cursor causes the visible portion of the page to get painted in 4
noticble steps/chunks.

An older version I tracked down with Google
(http://www.apache.jp/perl/guide/performance.html) which is also 300K+
doesn't have the same problem - just to show that it's not purely the
raw size of the page that is the problem.

Just a little feedback for the new site (which is great, btw).  If it's
just me with the problem, I'll go find a rock to hide under. :)

--Jim 

> A number of the most common sources of memory growth are explained in 
> the guide: 
>
http://perl.apache.org/docs/1.0/guide/performance.html#Improving_Perform
ance_by_Prevention
>
> - Perrin



Re: Purify, Perl and mod_perl

Posted by Perrin Harkins <pe...@elem.com>.
Carwheel, Dan wrote:
> although their web page says only works for C, C++, Java and a few
> others, I've seen this page:
> 
> 	http://www.perlpod.com/stable/perlhack.html 
> 
> on getting Perl work with with Purify.

That page is about getting Perl's C executable to work with Purify, not 
using Purify to check your perl code.

> My question is this...can I run my application using this purified perl
> under mod_perl to track down potential memory leaks and other problems?

You probably don't have any memory leaks.  Most things that people refer 
to as leaks are just normal growth.  A leak is when an area of memory 
gets "lost" because the program that allocated it forgets to free it. 
Growth is when your program uses variables in such a way that it needs 
more memory over time.  The latter is pretty common.  Doing things like 
eval'ing code, reading variable length data into strings, and keeping 
other data structures that are affected by changes in user input or data 
over time will often lead to this.

If you have out-of-control memory growth, you should try finding it the 
old-fashioned way: take things out until it stops.  Then, if you find a 
little section that causes growth and you can't understand why, post it 
here and someone may be able to explain it.

A number of the most common sources of memory growth are explained in 
the guide: 
http://perl.apache.org/docs/1.0/guide/performance.html#Improving_Performance_by_Prevention

- Perrin