On Wednesday, September 12, 2012 7:33:50 AM UTC-7, Gary Weaver wrote: > > On Tuesday, September 11, 2012 5:22:10 PM UTC-4, Masterleep wrote: >> >> Maybe something like a StringPool > > > That's a big one, and it would be something that needs to be addressed in > Ruby, not in Rails. But the problem is that you would have unintuitive > behavior for those used to doing things like: > > It could be implemented in Rails by using a container class to hold the database field names that are used as the keys inside the AR @attributes hash, and reusing the same string object across instances. Those strings are frozen anyway so the concern about modification doesn't apply. Based on the ObjectSpace data, that one change would have a large impact on the number of allocated subobjects for each AR model instance.
-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/6s6zemn2liEJ. 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-core?hl=en.
