[InterMine Dev] SNP script - timing out

Vallejos, Andrew avallejos at mcw.edu
Fri Aug 28 19:32:04 BST 2009

I hopefully have solved the problem.  I solved the memory leak problem,
the hopefully is that I am hoping that there are no side effects.

I added a destructor method to the Items class.

=head2 destroy

 Title   : destroy
 Usage   : $item = $item->destroy;
 Function: deletes the item object and its contents

sub destroy
	my $self = shift;
	my @keys = keys(%$self);
	foreach my $key (@keys) { delete $self->{$key} }
	return undef;

-----Original Message-----
From: dev-bounces at mail.intermine.org
[mailto:dev-bounces at mail.intermine.org] On Behalf Of Julie Sullivan
Sent: Friday, August 28, 2009 11:01 AM
To: dev at intermine.org
Subject: [InterMine Dev] SNP script - timing out


Can you test something for me?

In intermine/perl/lib/InterMine/Item.pm, comment out line 196:

	$other_item->set($field->reverse_reference_name(), $self);

This is the line setting the reverse reference for the item we're
saving.  We 
don't need it as we have the original reference, we were keeping it to
make the 
XML more human readable, I think.  The converter discards this reference

The idea is that the objects are being kept in memory (even though they
are out 
of scope) because an object you do have in scope has references to these

objects.  So Perl never lets them go.  Removing this reference hopefully
prevent that.

That's the idea anyway.

Let me know how that works out.


dev mailing list
dev at mail.intermine.org

More information about the dev mailing list