I have a few questions about how well RoR performs under various
'irregular' circumstances.  First, how quickly does rails work when
there are potentially lots of embedded ruby expressions (hundreds) per
page?  Also, how well does ruby do when there are perhaps hundreds of
database reads per page?

In the app I am designing, there would be a list of messages (let's
say 50 per page in this example, but it might be more.)  Each message
could have 0 from a group of several 'tags' applied (funny, serious,
sad, happy, etc...) and I want to to show these tag counts next to the
subject line of the message (only if they are > 0.)  This means one of
two things has to happen: I either have to add an integer column to
the messages table for every one of the tag categories (the number of
categories is likely to grow up to 30+.)  Or I have to add a table for
these count numbers and do a separate activerecord lookup for each one
of the categories for each of the messages on the page (which really
adds up!)

To give you an example, here's how one message might look:

* Hey Guys, I'm trying Ruby on Rails (Happy x3) (Funny x5) (Geeky x10)


What is the best way to model this for the best performance?  Remember
that there could be dozens of other tags that are not displayed
(because they are 0, or for other reasons.)

Is there any way to store a hash (or, if no other way an array of key
value pairs) in an active record class?

Many thanks for any advice you can give.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en.

Reply via email to