Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Re: Re: Perl memory Memory consumption

by orkysoft (Friar)
on Nov 24, 2001 at 04:20 UTC ( #127197=note: print w/ replies, xml ) Need Help??

in reply to Re: Re: Perl memory Memory consumption
in thread Perl memory Memory consumption

Does the program grow if you leave out that process_msg subroutine call?

Also, use strict and my variables where possible, and don't make circular references like $a = \$b; $b = \$a;, or they'll never really get out of scope (they might go out of scope and be unreachable, but since they refer to eachother, they'll never go away)

Comment on Re: Re: Re: Perl memory Memory consumption
Download Code
Replies are listed 'Best First'.
Re: Re: Re: Re: Perl memory Memory consumption
by alfatux (Novice) on Nov 26, 2001 at 20:19 UTC

    No, with process_msg the program not gows.

    I've investigating more an I detect that the problem could be in the get_msg funtion that looks like:
    sub get_msg {
      my $self = shift;
      my ($param) = @_;
      my $consulta_stack = qq{
                             SELECT *
                             FROM out
                             WHERE app = $param
                             ORDER BY id DESC LIMIT 100;
      my $sth = $self->{dbh}->prepare($consulta_stack);
      my $msgs = $sth->fetchall_hashref('id');
      return $msgs;
    I also observ that when there's no record in the resultset memory consumption is highter than when there's sontehing.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://127197]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2015-11-27 22:38 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (734 votes), past polls