Click here to get back home

Why php gettext is needed in real life?

 HomeNewsGroups | Search

comp.lang.php - PHP programming language discussions 

get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Why php gettext is needed in real life? howa 06-03-2008
Posted by howa on June 4, 2008, 11:16 am
Please log in for more thread options
On 6$B7n(B4$BF|(B, $B2<8a(B10$B;~(B09$BJ,(B, Joe Scylla

show/hide quoted text

Look interesting.

But...


1. Do you use any kind of op-cache? E.g. eA or XCache (it might make a
differences of 50-100% for your array / pure php implementation)

2. If using APC, take care of codes such as the following, e.g.

require_once("languages/$lang.php");

it might not be cached.

3. require_once() is slow and might be the bottomneck, try require();


Howard.




Posted by Joe Scylla on June 4, 2008, 12:06 pm
Please log in for more thread options
howa wrote:
show/hide quoted text

I have tested gettext against php array implementation with Zend
Optimizer and eAccelerator installed and used object caches with
different storage engines (eAccelerator shared memory api, MySQL, MySQL
memory tables and tmpfs).

Pure gettext was always faster in my benchmarks (Suse 10.x/Debian
3.1/4.0), but is was *more important* for me that gettext is not
remarkable slower.

Pure php may be faster on some systems (Windows, different Apache, other
version of gettext) but in the major cases it won't be much slower. And
gettext

Joe

Posted by howa on June 4, 2008, 1:26 pm
Please log in for more thread options
show/hide quoted text

I might suspect the bottomneck is due to the require_once (5000
require_once in a test), you might use xdebug to profile it if you
like.

Personally, I don't think method call is faster then array hashing.


Anyway, just my $0.05 (due to inflation)

Howard

Similar ThreadsPosted
Assertions in real life November 18, 2008, 5:51 pm
gettext.so April 15, 2008, 6:55 pm
Gettext doesn't worh, help! July 17, 2004, 8:39 pm
loading gettext January 10, 2005, 12:42 pm
GETTEXT (not really a question) July 13, 2005, 6:01 pm
Gettext fails me November 9, 2006, 8:32 am
gettext() function May 29, 2008, 3:46 am
Gettext problem December 18, 2009, 8:06 am
gettext vs custom ways May 10, 2007, 8:02 pm
Freebsd locales (gettext) October 26, 2007, 10:54 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Driving a better car - Fuelzilla.com

Cabling site for homeowners and pros alike - Cabling-Design.com

Friends:

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap
Privacy Policy