Gettext speed issues

Hi,

I noticed gettext severely impacts rendering time, 3-4x slower than
without. Is
there any hope of a faster one in the future maybe written in C?

Or any sort of support for pre-translated templates?

Any help or suggestions would be greatly appreciated,

Thanks!

  • steve dp

Hi,

On Mon, 4 Sep 2006 10:48:28 +0000 (UTC)
steve dp [email protected] wrote:

Hi,

I noticed gettext severely impacts rendering time, 3-4x slower than without. Is
there any hope of a faster one in the future maybe written in C?

Not planed.

Anyway, 3-4x slower? Hmm. It’s too slow. I think it’s special case.

Or any sort of support for pre-translated templates?

It may be better to use separate rhtml in each locales.
See
http://www.yotabanana.com/hiki/ruby-gettext-howto-rails.html#Localized+templates+for+Views%2FActionMailer.

BTW, the next version of Ruby-GetText is faster than older version.
The sample blog in Ruby-GetText is 1.96 times faster than 1.7.0 in my
environment.

Masao M. <mutoh highway.ne.jp> writes:

there any hope of a faster one in the future maybe written in C?

Not planed.

Sad about this :confused:

BTW, the next version of Ruby-GetText is faster than older version.
The sample blog in Ruby-GetText is 1.96 times faster than 1.7.0 in my
environment.

That’s GREAT to hear, I’m also going to look into the Rails Template
Optimizer.
There might be a way to have it work with gettext so that it only
actually
has to run the gettext lookup once per string per template and then
subsequent
loads theres no more gettext() calls invovled:

http://railsexpress.de/blog/articles/2006/08/15/rails-template-optimizer-beta-test
comments 18 -> 21