Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

performance improvement #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

angelf
Copy link

@angelf angelf commented Sep 21, 2010

Hi!

This patches improves by a factor of 8x the performance of GetText._(msgid) when no translation is available. The current code builds the same regex object for each possible key in a loop. This patch fixes that by moving the construction out of the loop.

Best regards,

many messages: moving a regex construction of a potentialy large loop
@nikosd
Copy link

nikosd commented Nov 8, 2011

Nice catch +1

@kou
Copy link

kou commented May 24, 2012

I've merged this idea (I used /.../o) in ruby-gettext/gettext@d4f76bf
Thanks!

@kou
Copy link

kou commented May 24, 2012

Sorry... We can't use /.../o for this case...
The original change is right.

ruby-gettext/gettext@b6f7555

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants