Because AR is a memory hog :) and I'm trying to trim down my memory usage since my processes keep getting killed for using too much memory by Dreamhost.
On Feb 3, 4:03 am, Tony Mann <[email protected]> wrote: > If you have working code with AR, why do you want to switch? > > ..tony.. > > On Tue, Feb 2, 2010 at 3:18 PM, Farley Knight <[email protected]>wrote: > > > Thanks for responding. This is a decent quick fix but I'm trying to > > push DataMapper into a drop in ActiveRecord replacement for a decent > > sized codebase. It seems to almost fit but there are a couple of edges > > that are poking out. > > > On Feb 1, 2:37 pm, Tony Mann <[email protected]> wrote: > > > Farley, > > > > One workaround is not call "thing.widgets" but rather query on Widget > > > directly; i.e. Widget.all(:thing_id => thing.id). Not as elegant, bit it > > > avoids eager loading. > > > > ..tony.. > > > > On Mon, Feb 1, 2010 at 6:31 AM, Farley Knight <[email protected] > > >wrote: > > > > > Searching the group I noticed this question has been asked before, but > > > > without much response: Is there a way to disable eager loading for a > > > > particular relation? If not, for my entire installation? If there > > > > isn't any easy way, maybe just a hint as to what source file this > > > > logic is contained in.. Hopefully this is logic is not tightly coupled > > > > our spread about various files. > > > > > I'm having the issue that I'm calling something like > > > > "thing.widgets.count" and instead of querying with something like > > > > "select count(*) from widgets where widgets.thing_id = #{id}" I keep > > > > running out of my already small amount of Dreamhost memory with a > > > > query like "select id,name,description from widgets where > > > > widgets.thing_id = #{id}". I think I redefined this method but still > > > > had the same problem. > > > > > Thanks, > > > > - Farley > > > > > -- > > > > You received this message because you are subscribed to the Google > > Groups > > > > "DataMapper" group. > > > > To post to this group, send email to [email protected]. > > > > To unsubscribe from this group, send email to > > > > [email protected]<datamapper%[email protected]> > > <datamapper%[email protected]<datamapper%[email protected]> > > > > > . > > > > For more options, visit this group at > > > >http://groups.google.com/group/datamapper?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "DataMapper" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<datamapper%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/datamapper?hl=en. -- You received this message because you are subscribed to the Google Groups "DataMapper" 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/datamapper?hl=en.
