Performance is horrid with that many objects. I have since switched to
using a query for the large collections (which also fixes the original
issue of this post). I had a 2900% increase in performance. I hadn't
noticed the performance problems originally, since the objects were
still in memory after creation, so they were loading instantly on the
view page. After reinitializing my application and then trying to load
the objects, the problem is apparent. I was only testing with 5 or 10
in the beginning so the problem floated by unnoticed, so I'm glad I
switch to a query anyway. Still, the original many-to-many add / get
array problem persists in the cases where I only have a few objects. I
have been using a query for those as well, but would still like it to
work through Transfer  if possible, as I would like to use some of the
objects.

To answer your question, yes, this is only happening when the objects
are proxied. I will check the results of getIsDirty() and
getTagsIsLoaded(), but I should let you know that I have tried
running .loadTags(); before calling getTagsArray(), but the issue is
unaffected. What results should I have for those two?

Oh, a sort of side-note, but having run these queries via TQL to patch
the problem, I notice that they are run each time and are not cached.
I have taken to copying the generated SQL from Transfer out into a
normal <cfquery> so that I can enable caching when I need to. Is there
a way to turn on caching for TQL queries?

On Nov 2, 1:56 pm, Mark Mandel <[email protected]> wrote:
> So this is still directly related to having the object as a proxy, as
> opposed to having it as a full blown object?
>
> (Just curious how the performance is of 500 objects, I'd be doing that more
> as a query, but I digress....)
>
> So some things to check out:
>
> <cfoutput>
> Is the object directy: #post.getIsDirty()# <br/>
> Is the m2m loaded? : #post.getTagsIsLoaded()# <br/>
> </cfoutput>
>
> Those are the only 2 things that should stop the SQL from firing.
>
> What SQL are you seeing in the debug when you run your test case?
>
> Mark
>
> On Tue, Nov 3, 2009 at 7:40 AM, whostheJBoss 
> <[email protected]>wrote:
>
>
>
>
>
>
>
> > Ok, I have tested this on CF8 and CF9 and I get identical behavior as
> > I do with Railo. If I make a call to the SOMEPARENT.getWHATEVERArray()
> > function, subsequent saves of many-to-many WHATEVER to SOMEPARENT do
> > not save. The first addWHATEVER() works, but after that they fail to
> > save.
>
> > In this case, calling user.getPostsArray(); causes user.addPosts
> > (newPost); not to save after the first attempt.
>
> > p.s. I probably get under your skin at times, sorry! Anyway, by
> > testing I hadn't meant unit tests, I'd just meant that I'd tried the
> > functionality in various ways to test if it worked in production, not
> > that the code was stable via unit test results.
>
> > > Considering I expect a lot of people have done this on CF8, I will be
> > > surprised if it doesn't work.  That being said, I've been surprised
> > before.
>
> > Well... surprised? :)
>
> > Maybe I'm oblivious to something huge here, but... maybe try my
> > example and see? It's a pretty easy example..
>
> --
> E: [email protected]
> T:http://www.twitter.com/neurotic
> W:www.compoundtheory.com
--~--~---------~--~----~------------~-------~--~----~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
"transfer-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to