Re: Fetching data in WOLongResponsePage
Re: Fetching data in WOLongResponsePage
- Subject: Re: Fetching data in WOLongResponsePage
- From: Chuck Hill <email@hidden>
- Date: Fri, 29 Aug 2008 21:25:23 -0700
On Aug 29, 2008, at 8:16 PM, Art Isbell wrote:
I have an app that requires a series of large, slow fetches to
produce one of its responses. These fetches are causing
unacceptable delays in returning this response. I am unable to
improve the fetch speed, so I need to provide feedback to the user
during this fetch delay.
WOLongResponsePage seems suited for this task. After fetching
approximately 15,000 objects of 10 different types in the
WOLongResponsePage, I need to transfer these objects back to the
main request-response thread in a manner that won't result in these
objects being refetched when referenced. Is there a proven approach?
I have created and locked a new editing context in the
WOLongResponsePage's performAction(). I fetch about 15,000 objects
into this editing context. I create an array of global ID's of one
type of fetched object and return this array from performAction().
pageForResult() returns this global ID array to the result page
which converts them to faults in the main thread editing context.
However, these objects have null properties, so when they are
referenced, they are refetched which defeats the entire purpose of
the WOLongResponsePage.
What am I doing wrong to cause this refetch? Do I need to return
global ID's of all 15,000 objects to prevent them from being
refetched even though they are all related?
What is the fetchTimestamp of the EC in the main thread? If it is
older than the objects being returned and their related objects, it
should not fetch. Hmmm, slow fetches... are you using a second EOF
stack in the long response page? This will have a different cache of
snapshots than the main thread. You would need to register the
snapshots in the main thread's object store to avoid re fetching in
that case. Otherwise I am stumped.
Chuck
--
Chuck Hill Senior Consultant / VP Development
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