Yea - that's beyond the capabilities of iterators.  I wouldn't treat that
many records as objects.  400 instantiations of anything is bad news.  

My suggestion: write a custom query on your record that returns a query with
all the data you need.

Either that, or you could use getAt() and only convert a small set of
records in your iterator into objects.  By default the iterator is backed by
a query, so that should be fast enough.  If you call getArray() *all* the
records in the iterator will be converted to records and you might as well
go take a nap.  However, getArray(1,10) will convert the first 10 records to
Records and won't be as expensive.  Some method of using this might be a
good option for you.

Doug

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Aaron Lynch
Sent: Wednesday, August 30, 2006 11:44 AM
To: [email protected]
Subject: [Reactor for CF] Iterator performance question

I am encountering some slow processing/request time-outs when trying to
do any instantiation of an object's children (400 ish child objects ,
each has additional child objects of their own) and I am hoping someone
else out there has seen this too.

Here is the scenario:
Company object is instantiated in the session scope.

A Company has Many Questions (via a linked relational table
"CompanyQuestions")

(There happen to be 448 Questions associated with this Company.)

Each Question has a couple has One relationships of its own.

When I do a getQuestionIterator().getArray() I get a request timeout
(obviously, the same thing happens when I loop over the iterator to
access each Question object)...

note:  I changed the request timeout to 180 seconds just to see if it
could
complete within that time-frame, it still timed out. 

When I do a getQuery() it runs fine and returns the record-set as it
should.

Reactor config is set to production mode...
Database is MSSQL 2000...

Any ideas on ways to improve this performance?  I need to get to the
Question's children as part of the process I am working on, and I would
like to be able to utilize the Question iterator if possible.  

Thanks in advance,
Aaron Lynch
www.AaronJLynch.com




-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --



-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to