On Dec 23, 2008, at 4:17 PM, Emilio Tagua wrote:
> I ask him about if whether is recommended to use Symbols or Strings
> when translating an application using Rails i18n translate method.
> Sven recommended me to use symbols but then i told him about the thing
> that symbols are never garbage collected, in a large application with
> lots of translations this would mean having all those symbols in
> memory.
>
> But then i though that this translations are probably going to be used
> very frequently and it''s not that bad to have them in memory.
>
> So the question is, do you think string or symbols should be used? is
> this a performance vs memory problem?
Translations are loaded entirely per language, so you''ll have it in
memory anyway. Also, the memory overhead of having around 20,000
translation keys is probably going to be 1 megabyte at most. I
wouldn''t worry about it.
Manfred
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-core+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---