Transforming to/from yml consumes CPU cycles, but storing a large field to database consumes network bandwidth and disk IO:( In this case, I am afraid my colleague's solution is right: save that list as a comma separate string.
Your 2nd point is right, I will consider not storing friend list later. But besides friend list, there are other fields that need to stored as serialized attr. Thanks On Aug 15, 11:32 pm, Matt Jones <[email protected]> wrote: > On Aug 15, 8:39 am, clive <[email protected]> wrote: > > > The world continued to function because few people used rails in high > > profile website at that time. Our app has more than 50 million HTTP > > requests per day, so we have to hack a lot of rails plugins that have > > performance issues under such load:( > > The patch proposed here would fix this > > issue:https://rails.lighthouseapp.com/projects/8994/tickets/2764-supporting... > > I hope it will be merged to edge rails > > No, actually, it won't. Unless you're claiming that the bottleneck is > in transmitting the data to the DB, that patch still converts every > serialized attribute to YAML almost every time that the record is > saved (note the calls to object_to_yaml). Serialized fields that are > changed will get converted *again*. So if anything, the overhead may > be worse than before... > > I also find the idea of taking one of the primary parts of a social > networking site (friend linking) and making it opaque through > serialization to be very odd. Isn't the whole point of the "social > media" fad to be analyzing and drawing conclusions from the network > graph? Meh. > > --Matt Jones --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

