<?xml version="1.0" encoding="UTF-8"?>
<!-- name="generator" content="pyblosxom/1.4.1 7/27/2007" -->
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">
<channel>
<title>Блогчетање 10 Nov 2003</title>
<link>https://danilo.segan.org/blog</link>
<description>Данилово блогче</description>
<language>en</language>
<item>
  <title>Improvements to PHP-gettext on Savannah</title>
  <link>https://danilo.segan.org/blog/ihatephp/improvements-to-php-gettext-on-savannah</link>
  <description><![CDATA[
<p>First of all, a note to anyone who cares: PHP gettext was approved
for hosting on <a href="http://savannah.gnu.org">GNU's Savannah</a>. 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 <strong>is</strong> a GNU project, and the goal for
PHP-gettext is to add the same interface where GNU gettext is not
available).</p>

<p>So, be sure to report any <a
href="http://savannah.nongnu.org/bugs/?group=php-gettext">bugs</a>, or
send any <a
href="https://savannah.nongnu.org/patch/?group=php-gettext">patches</a>. If
you wish to download latest and greatest version, check <a
href="http://savannah.nongnu.org/projects/php-gettext/">PHP-gettext</a>
project page, and visit either the Files section for released
tarballs, or CVS section for instructions on using CVS to fetch the
development version.</p>

<p>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.</p>

<p>With the old PHP gettext, a stress test of reading in the same
string for translation 10.000 times showed the following result:</p>
<pre>real    0m23.302s
user    0m20.080s
sys     0m0.430s
</pre>

<p>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:</p>
<pre>real    0m8.246s
user    0m7.340s
sys     0m0.150s
</pre>

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

]]></description>
</item>

</channel>
</rss>
