Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Callbacks on large number of EmbeddedDocuments blows stack
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jamie Orchard-Hays  
View profile  
 More options Apr 16 2012, 9:57 am
From: Jamie Orchard-Hays <jamie...@gmail.com>
Date: Mon, 16 Apr 2012 09:57:55 -0400
Local: Mon, Apr 16 2012 9:57 am
Subject: Callbacks on large number of EmbeddedDocuments blows stack
I wonder if anyone else has encountered this. I've written a detailed description in a bug ticket at github.

https://github.com/jnunemaker/mongomapper/issues/405

(Not a problem on Rails 2.3.x and MM 0.8.6.)

I'm hoping to have time to dig into the MM code to see if I can offer up a fix soon.

Jamie


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brandon Keepers  
View profile  
 More options Apr 16 2012, 10:06 am
From: Brandon Keepers <bran...@opensoul.org>
Date: Mon, 16 Apr 2012 10:06:50 -0400
Local: Mon, Apr 16 2012 10:06 am
Subject: Re: [MongoMapper] Callbacks on large number of EmbeddedDocuments blows stack

Jamie,

That is the same issue as https://github.com/jnunemaker/mongomapper/issues/265. A lot of people have experienced the issue, but nobody has submitted a fix for it.

I've never run into it because I don't use embedded docs in that manner. If I ever sense that an embedded association could end up with more than two or three documents, I pull it out into a collection. I've never had an instance where I would need every associated doc whenever I fetched the parent. I'm not saying there's not a legitimate use case for needing ~80 embedded docs every time the parent is fetched, but I do think it's rare and most people would be better off using a non-embedded document.

Unless someone can figure out a way to hack ActiveSupport 3's Callbacks, then I agree with @jnunemaker, I think we should just pull callbacks on embedded documents.

=b


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jamie Orchard-Hays  
View profile  
 More options Apr 16 2012, 10:22 am
From: Jamie Orchard-Hays <jamie...@gmail.com>
Date: Mon, 16 Apr 2012 10:22:28 -0400
Local: Mon, Apr 16 2012 10:22 am
Subject: Re: [MongoMapper] Callbacks on large number of EmbeddedDocuments blows stack

Thanks, Brandon. My use case is I'm storing monthly reports. It makes a lot of sense to me to store my data this way. I'd love to hear arguments against it. My experience that past two years working extensively is that there is a sweet spot I have to find for certain situations between write and read performance when I have large trees like for these reports.

I'll take bug-specific comments to the ticket.

Cheers,

Jamie

On Apr 16, 2012, at 10:06 AM, Brandon Keepers wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »