[Dbix-class] Fix memleak for long-lived resultsets.
Vladimir Timofeev
vovkasm at gmail.com
Fri Jul 12 10:02:13 GMT 2013
I made pull request with quick fix on github
https://github.com/dbsrgits/dbix-class/pull/29
Quote:
It is a recursive attributes hash chain when call search on the same
resultset many times. It looks like pseudo-leak with long-lived resultsets.
In our application (that long-lived daemon) we use something like this:
sub periodic_refresh {
state $rs = $schema->resultset('ServerBackend')->search({status=>'active'},{order_by=>'me.id',prefetch=>'Server'});
my @fresh_backends = $rs->all; # now we use this workaround:
$rs->search; but it is slower because new resultset created on every
iteration
# other refresh logic
}
Please review, and apply if possible! ;-)
--
Vladimir Timofeev <vovkasm at gmail.com>
More information about the DBIx-Class
mailing list