> > Why is the memory consumption so high ? According to my calculations it
> > should take less than 100 kilobytes.
>
> What are you basing that on?

I use a single object (lightweight) which I construct  and then just call
its method in a loop, once for each message. If I don't use globals, use
strict, undef $SomeVar I'm doing the right thing. All the "my" variables
should dissapear once the method call is over. But nevertheless memory goes
on and on. Maybe this is because I tweaked vpopmail.pm (xs code) to include
information about user quotas which wasn't present there (perl hash) ?

> It sounds like you have some data structure which you are adding to and
> never clearing out.  One thing to be careful of is the MySQL DBI driver.
> The last time I used it, it fetched all returned rows into memory.  With a
> large result set, that could take up tons of RAM.

I guess that DBI gets all records if you use fetchall_array|hashref and that
it is else OK.

tnx. for reply
  mire

Reply via email to