Блогчетање

Данилово блогче

Mon, 10 Nov 2003

First of all, a note to anyone who cares: PHP gettext was approved for hosting on GNU's Savannah. I also asked for it to be included in the GNU project, but I don't expect that to happen for various reasons (first of all, it requires PHP which itself is not a GNU project — though, one might argue that GNU gettext is a GNU project, and the goal for PHP-gettext is to add the same interface where GNU gettext is not available).

So, be sure to report any bugs, or send any patches. If you wish to download latest and greatest version, check PHP-gettext project page, and visit either the Files section for released tarballs, or CVS section for instructions on using CVS to fetch the development version.

I've also made some simple improvements in the code which increases performance in some corner-case situations (like reusing of same translation a number of times), but which won't help in general use-cases. If you've got any suggestions, be sure to send them over.

With the old PHP gettext, a stress test of reading in the same string for translation 10.000 times showed the following result:

real    0m23.302s
user    0m20.080s
sys     0m0.430s

Adding caching of already read in entries has improved the performance three-fold in this particular example (for 1000 reads, the improvement was two-fold, so this can be noticed only in rare occasions), as the following statistics show:

real    0m8.246s
user    0m7.340s
sys     0m0.150s

Wow, what an improvement in a case no one is going to come across? Wonderful! :-)

[23:59] | [/ihatephp] | # | G | | TB
Contact
Danilo Segan

This is blog (web log) of Danilo Šegan (or Данило Шеган).

Archives
2017-Jan
2013-Dec
2011-Nov
2011-Oct
2011-Aug
2011-Jul
2011-Jun
2011-May
2010-Oct
2010-Aug
2010-Jul
2010-Apr
2010-Mar
2010-Feb
2010-Jan
2009-Dec
2009-Oct
2009-Aug
2009-Jun
2008-Oct
2008-Aug
2008-Jul
2008-Jun
2008-May
2008-Apr
2008-Mar
2008-Feb
2007-Dec
2007-Oct
2007-Aug
2007-Jul
2007-May
2007-Apr
2007-Feb
2007-Jan
2006-Nov
2006-Oct
2006-Aug
2006-Jul
2006-Apr
2006-Mar
2006-Feb
2006-Jan
2005-Sep
2005-Jun
2005-May
2005-Apr
2005-Mar
2005-Feb
2004-Dec
2004-Nov
2004-Oct
2004-Sep
2004-Aug
2004-Jul
2004-May
2004-Apr
2004-Mar
2004-Feb
2004-Jan
2003-Dec
2003-Nov
2003-Oct
2003-Sep
1983-Mar

< November 2003 >
MoTuWeThFrSaSu
      1 2
3 4 5 6 7 8 9
10111213141516
17181920212223
24252627282930
Categories

Links
Kvota.net
Prevod.org
My study page
Srpski.org
GNOME
Friends' Blogs
alex (en)
bc (en)
Bojan Živanović (sr)
Carlos (en)
Goran (sr)
imp (sr)
lilit (sr)
Oskuro (en)
Zombie (sr/en)
Feeds
RSS