hardburn has asked for the wisdom of the Perl Monks concerning the following question:
From the Class::DBI documentation:
Currently the iterator initially fetches all the matching row data into memory, and defers only the creation of the objects from that data until the iterator is asked for the next object. So using an iterator will only save significant memory if your objects will inflate substantially when used. (emphisis mine)
Can anybody give me an example of when this might happen? I can't think of a case where the object itself would cause significantly more memory to be used, and I imagine it doesn't come up a lot, but I could be wrong.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
Note: All code is untested, unless otherwise stated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Class::DBI Iterator Memory Usage
by dragonchild (Archbishop) on Sep 12, 2003 at 18:27 UTC | |
|
Re: Class::DBI Iterator Memory Usage
by bsb (Priest) on Sep 13, 2003 at 07:46 UTC |