[development] Two performance improvements

Alan Dixon alan.g.dixon at gmail.com
Thu Jul 13 19:33:24 UTC 2006


In general, it makes sense for a source = '' to be the slowest (since
the more data you have the faster the match), but it also seems like a
waste to be doing this since you already know the answer (or do you
ever want to translate the empty string?).

How about putting this into line 134 of  locale.module as an experiment:

if (!$string) return;

And then take a look at your output. I don't know why you'd be wanting
to translate an empty string anyway (you could put in a
debug_backtrace in that line instead to find out though).

 - Alan


On 7/13/06, Jakub Suchy <jakub at rtfm.cz> wrote:
> Jakub Suchy wrote:
> > Alan Dixon wrote:
> > > since you're using i18n and 4.6, this sounds like it might be this issue:
> > >
> > > http://drupal.org/node/65801
> > > which can be mitigated with an index but is really a sort of a
> > > complicated bug about the init_ hook.
> >
> > Applied the patch, but nothing changed. Not this issue...Still getting
> > times about 1-1.5 seconds.
>
> Attaching devel.module output, the source = '' query is still the
> slowest. I don't get it, where it appears...
>
> Jakub
>
>
>


-- 
Alan Dixon, Web Developer
http://alan.g.dixon.googlepages.com/


More information about the development mailing list