hello, I need a help, or maybe advice how to localize my application. now i used Globalized, it''s works perfectly, BUT 1) when i tried to localized my admin pages which used activescaffold it works very-very SLOW, check a log Completed in 6.39100 (0 reqs/sec) | Rendering: 0.00000 (0%) | DB: 0.01600 (0%) | 200 OK [http://localhost/en/kvarturas/new?_method=get&adapter=_list_inline_adapter] Without globalized this i can get 5-10 request per second!!! 2)please check this pert of log(why i always checking translation in database for the same labels) Rendered ../../vendor/plugins/active_scaffold/frontends/default/views/_form (6.26500) SQL (0.000000) BEGIN Globalize::ViewTranslation Load (0.000000) SELECT * FROM globalize_translations WHERE (tr_key = ''Create'' AND language_id = 1819 AND pluralization_index = 1 AND namespace IS NULL) AND ( (globalize_translations.`type` = ''ViewTranslation'' ) ) LIMIT 1 SQL (0.000000) COMMIT SQL (0.000000) BEGIN Globalize::ViewTranslation Load (0.016000) SELECT * FROM globalize_translations WHERE (tr_key = ''Create'' AND language_id = 1819 AND pluralization_index = 1 AND namespace IS NULL) AND ( (globalize_translations.`type` = ''ViewTranslation'' ) ) LIMIT 1 SQL (0.000000) COMMIT SQL (0.000000) BEGIN Globalize::ViewTranslation Load (0.000000) SELECT * FROM globalize_translations WHERE (tr_key = ''Cancel'' AND language_id = 1819 AND pluralization_index = 1 AND namespace IS NULL) AND ( (globalize_translations.`type` = ''ViewTranslation'' ) ) LIMIT 1 SQL (0.000000) COMMIT SQL (0.000000) BEGIN Globalize::ViewTranslation Load (0.000000) SELECT * FROM globalize_translations WHERE (tr_key = ''Cancel'' AND language_id = 1819 AND pluralization_index = 1 AND namespace IS NULL) AND ( (globalize_translations.`type` = ''ViewTranslation'' ) ) LIMIT 1 SQL (0.000000) COMMIT Rendered ../../vendor/plugins/active_scaffold/frontends/default/views/_create_form (6.31300) As you can see - label ''Create'' it always searching in database for translation, no caching, always used SELECT. Please recommend me better localization plugin, better with example, that works very fast and support for DATES,MONTH''S translation! Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Is this in production mode, or just development mode? From what I understand, Globalize does cache ViewTranslations in memory. They would most likely not be cached in development mode. -sk Igor K. wrote:> I need a help, or maybe advice how to localize my application. > > now i used Globalized, it''s works perfectly, BUT > 1) when i tried to localized my admin pages which used activescaffold it > works very-very SLOW, check a log > > Completed in 6.39100 (0 reqs/sec) | Rendering: 0.00000 (0%) | DB: > 0.01600 (0%) | 200 OK > [http://localhost/en/kvarturas/new?_method=get&adapter=_list_inline_adapter] > > Without globalized this i can get 5-10 request per second!!! > > 2)please check this pert of log(why i always checking translation in > database for the same labels) > > Rendered > ../../vendor/plugins/active_scaffold/frontends/default/views/_form > (6.26500) > > SQL (0.000000) BEGIN > [ snip ] > > SQL (0.000000) COMMIT > > Rendered > ../../vendor/plugins/active_scaffold/frontends/default/views/_create_form > (6.31300) > > As you can see - label ''Create'' it always searching in database for > translation, no caching, always used SELECT. > > Please recommend me better localization plugin, better with example, > that works very fast and support for DATES,MONTH''S translation!-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Steve Koppelman wrote:> Is this in production mode, or just development mode? From what I > understand, Globalize does cache ViewTranslations in memory. They would > most likely not be cached in development mode. > > -sk >I run it on development mode? How to cache globalized tableViewTranslations in memory? Thanks for reply -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Look at the documentation. I think it happens automatically in production mode. The whole purpose of development mode is to reflect code changes immediately, so there is no caching. Igor K. wrote:> Steve Koppelman wrote: >> Is this in production mode, or just development mode? From what I >> understand, Globalize does cache ViewTranslations in memory. They would >> most likely not be cached in development mode. >> >> -sk >> > > I run it on development mode? > > How to cache globalized tableViewTranslations in memory? > > Thanks for reply-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Steve Koppelman wrote:> Look at the documentation. I think it happens automatically in > production mode. The whole purpose of development mode is to reflect > code changes immediately, so there is no caching. >Ok I will check it Thanks for answers>> >> I run it on development mode? >> How to cache globalized tableViewTranslations in memory?-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Igor K. wrote:> Steve Koppelman wrote: >> Look at the documentation. I think it happens automatically in >> production mode. The whole purpose of development mode is to reflect >> code changes immediately, so there is no caching.The same situation with production mode, with globalize activescaffold page rendered - 2 or 3 seconds without globalizer - 0.2-0.3 seconds wellcome page with globalize - 20-30 reguests/second wellcome page without globalize - 7-10 reguests/second What to do? How to localize pages? But with support for translation dates. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
atpunkt-TM7Dk29TcfyELgA04lAiVw@public.gmane.org
2007-Sep-11 15:08 UTC
Re: globalized is too slow, need a solution
if we are talking about the same Globalize Extension here (the "string".t one, not the one that goes _("string") ) - I found that it doesn''t cache Strings that don''t exist in the database (or have a ''text'' column that IS NULL). but when it has found them, then it uses the cache. you could try out some script/console magic to set all the translations in the default language to the value in the tr_key-column an see if this speeds up things. hope this helps, phil On 11 Sep., 11:04, "Igor K." <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Igor K. wrote: > > Steve Koppelman wrote: > >> Look at the documentation. I think it happens automatically in > >> production mode. The whole purpose of development mode is to reflect > >> code changes immediately, so there is no caching. > > The same situation with production mode, > with globalize activescaffold page rendered - 2 or 3 seconds > without globalizer - 0.2-0.3 seconds > wellcome page with globalize - 20-30 reguests/second > wellcome page without globalize - 7-10 reguests/second > > What to do? How to localize pages? But with support for translation > dates. > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> "string".t one, not the one that goes _("string") ) - I found that it > doesn''t cache Strings that don''t exist in the database (or have a > ''text'' column that IS NULL). but when it has found them, then it uses > the cache. you could try out some script/console magic to set all the > translations in the default language to the value in the tr_key-column >I have found a solution - a patch for globalize, now globalize caching data. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Igor Have you tried activescaffoldlocalize by Edwin Moss On Sep 13, 4:09 pm, "Igor K." <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > "string".t one, not the one that goes _("string") ) - I found that it > > doesn''t cache Strings that don''t exist in the database (or have a > > ''text'' column that IS NULL). but when it has found them, then it uses > > the cache. you could try out some script/console magic to set all the > > translations in the default language to the value in the tr_key-column > > I have found a solution - a patch for globalize, now globalize caching > data. > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> Have you tried activescaffoldlocalize by Edwin Moss >As i know used gettext plugin? I get some problems with gettext(i don''t know how to use it properly, how to add new language, and gettext store all translation to files, but with globalize i can easily translate pages via administration pages(because translation stored to database) and after opening pages translation saved in cache-so it works faster), so when i found patch i still use globalize. Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> I have found a solution - a patch for globalize, now globalize caching > data.Hey, could you share the plugin you found -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---