Re: Large Array Clogging
Re: Large Array Clogging
- Subject: Re: Large Array Clogging
- From: Miguel Arroz <email@hidden>
- Date: Mon, 7 Jan 2008 11:24:01 +0000
Hi!
I had that problem once, and the problem is that I thought I was
deleting and creating new ECs, when I was only creating.
The best thing you can do is to create a new EC, work on that EC
with a data batch, and then dispose of the EC and create a new one.
Be careful, as Chuck said, you cannot keep any reference to any
object inside the EC when you dispose it.
A very nice way to get an idea of your memory usage graphically
and in real time is to use jconsole. Check <http://terminalapp.net/
profiling-webobjects-applications/>. If you get your code right, you
should have a line that, in average, is flat. Currently, you should
have something like a ladder going up in small steps.
Yours
Miguel Arroz
On 2008/01/06, at 19:53, Drew Thoeni wrote:
I have two tables in a parent-child relationship. Some of the
parents have a few children (say a few dozen) and others have many
children (over 100,000). I'm trying to run through the parents and
pre-calculate some statistics for their children (for example,
average, mode, standard deviation, etc.).
All this is working except when I reach a specific parent (#457)
the processing just hangs. I ran this through debug and it stalls
at the creation of the array for the children.
However, the system would have already processed a similar size
array (#30 has 118,000 children) and it seems it's in a loop.
Activity monitor says the java process is taking 100%.
Other background. I only save the ec after every 20 updates to the
parent records (to reduce write time). And I use
ec.invalidateAllObjects() right after saving to clear our memory.
Finally, there is nothing wrong with the data in parent/children of
#457 as I can start the process there (or a few parents ahead of
this) and it runs fine.
This seems like a memory problem, but I don't get an out of memory
exception.
Help on this?
Drew
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40guiamac.com
This email sent to email@hidden
Miguel Arroz
http://www.terminalapp.net
http://www.ipragma.com
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden