Re: WO and Memory Management
Re: WO and Memory Management
- Subject: Re: WO and Memory Management
- From: Chuck Hill <email@hidden>
- Date: Fri, 14 Jul 2006 11:01:11 -0700
On Jul 14, 2006, at 10:03 AM, John Larson wrote:
Either all of your actions are a little slow or some are very
slow. Sight unseen, my money is on the latter. Usually this is
the result of DB access, either queries that are slow to evaluate
due to missing indexes
DOH ! **Hits self in the head** Thats one thing I need to do when
there DBA gets back from holidays :) We moved the DB from OpenBase
to Oracle and we haven't been back an applied indexing yet : )
IMHO I wouldn't spend too much more time troubleshooting until you
add the indexes to the tables. The other evidence seems to point
to slow DB access and lack of indexes will only exasperate this
problem. After this is fixed, then you will be in a much better
position to judge the performance of the java vm and assorted
processes.
As for this next statement, take it with a grain of salt, because I
really don't have any evidence that this is effecting your
problem. But, I had this problem when getting started with
webobjects and using display groups and fetch specifications to
bring in objects, then aggregating fields across all the objects in
the dg or fetch spec. I had a couple of queries that would go
against the db and pull in thousands of records, then build eo
objects in memory, then go through all the records and sum a field
value. Anyways, it was bad design on my part since I didn't
understand what was going on, and I paid in all kinds of out of
memory errors and affiliated problems. So, the only reason I bring
that up is that it is possible for your app to get all bogged down
if you are inadvertently bringing in way more records than you mean
to. It can slam your db since the transaction is huge, and your VM
since it is building eo instances for all the records.
An additional note on John's excellent comments: reading a large
number of rows from a table will usually cause the database to
escalate the row locks to a full table lock. This will then block
all the other running instances. Obviously, this is not good for
performance.
Wonder has a display group or a fetch iterator (my memory is a bit
foggy this morning), that will allow you to fetch in batches of
records without hauling in the entire result set at once. This is
very useful if you don't need all the results at once.
Chuck
--
Coming sometime... - an introduction to web applications using
WebObjects and Xcode http://www.global-village.net/wointro
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems. http://www.global-village.net/products/practical_webobjects
_______________________________________________
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