tag:blogger.com,1999:blog-12467669.post5628882340998795612..comments2023-04-29T07:23:25.825-04:00Comments on Jay Fields' Thoughts: Rails: ActiveRecord Serialize methodJayhttp://www.blogger.com/profile/14491442812573747680noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-12467669.post-33904500378141106772008-03-04T18:15:00.000-05:002008-03-04T18:15:00.000-05:00YMMV but I find serialization a major slow-down. O...YMMV but I find serialization a major slow-down. One of my biggest methods had a 50% slowdown just due to one serialization. YAML is probably the culprit: slow as sh*t.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-78415232386158823662007-03-24T10:50:00.000-04:002007-03-24T10:50:00.000-04:00Michael,Until this week I had never seen composed_...Michael,<BR/>Until this week I had never seen composed_of or serialize so I really didn't know which option would be better. The composed_of method is much better documented; however, the serialize method seemed better suited for my specific case based on it's simple implementation. Part of this decision was based on the fact that my aggregate objects are reference data provided by an external service and I never need to query based on the values.<BR/><BR/>Thanks for the tip, I may switch to composed_of in the future just to see how it works out.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-37655778002378175352007-03-23T17:58:00.000-04:002007-03-23T17:58:00.000-04:00Wouldn't it be more useful to use an aggregate (co...Wouldn't it be more useful to use an aggregate (composed_of) for your purpose? Serialized attributes can't be used in conditions, aggregates can.Anonymousnoreply@blogger.com