Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

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)

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2018-05-21 19:00 GMT
Find Nodes?
    Voting Booth?