Re: Opinions on fetching/filtering
Re: Opinions on fetching/filtering
- Subject: Re: Opinions on fetching/filtering
- From: Art Isbell <email@hidden>
- Date: Fri, 13 Jan 2006 09:26:07 -1000
On Jan 13, 2006, at 6:33 AM, Ken Anderson wrote:
From what you've said, I would probably cache the user's current
portfolio in the session and use in-memory filtering to generate
results. If you're using any kind of cross instance notification
mechanism, you could always hook that up to the project cache. I'm
making the assumption that these objects aren't too big - if
they're more than a few hundred bytes, I might reconsider that
position.
EOF will cache snapshots as long as the objects associated with them
are in an editing context, so caching the objects themselves
shouldn't take much more memory. My view has been that if these
snapshots are fresh enough, I might as well cache the objects
associated with these snapshots myself rather than refetching them.
By default, refetched objects will be discarded anyway, so why take
the time to refetch them? Of course, if you want to refresh the
snapshots and have taken measures to ensure that the fetched objects
refresh the snapshots, that's a good reason to refetch.
Filtering objects in memory does take time, but I assume that it's
quicker than the fetch overhead. I've never measured the performance
of NSSet operations, but I use them to eliminate duplicate objects,
for example. This has been "fast enough" in my situation.
Aloha,
Art
_______________________________________________
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