Nested Sets are pissing me off

December 11th, 2008

So a few posts ago I wrote about BetterNestedSet.  At the time, this seemed like a great solution to store and quickly search/access multiple URLS.  But we have a large database and thousands of nodes per tree causes the nested set model to break down.  Reseting all of the left/right values down the tree just takes too damn long.

We threw around the idea of pulling out tlds and storing the rest of the urls in many, many flat nested sets.  But I just don’t like the idea of little branches hanging around in my table.  It’s inelegant and confusing.  I’ve refactored the crap out of my original code only to find out that BNS throws an ArgumentError error when you upgrade to Rails 2.1.  

wrong number of arguments (3 for 2)

So, rather than upgrading to Awesome Nested Set (which has yet to live up to its name) and hacking my table to death, I’m throwing in the towel and embracing plain old Acts_As_Tree.  Unless someone can give me a reason not to….

 

Entry Filed under: Ruby on Rails

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


RSS Berkman Gender & Tech

RSS Tweets

Tags

Meta