Also see the section "Performance optimization when using a default
locale":
http://framework.zend.com/wiki/x/S1c
I couldn't find anything about performance optimization on that page.
Even if I search for "performance optimizaiton locale" in whole ZF
wiki I don't find anything.
There is an example within that page with the mentioned header.
And you should fix your search "optimizaition" is false... you should write
"optimization" ;-)
Maybe what you mean is, after Zend _Locale instance is created, I can
serialize it and keep in cache for subsequent requests.
In my situation, I initialize Zend_Locale for every session using
Zend_Locale() to detect browser locale. So I should serialize and save
Zend_Locale for every session?
I have from ten to hundred concurrent users. I can't let Zend_Locale
load and parse xml file on every request.
What can you suggest for me?
WHEN you searialize Zend_Locale the read CLDR data is also stored within the
session
because the read data is cached within the object... Zend_Locale will not
read the XML File
once more.
And the point was that serialization of the Zend_Locale object takes as much
time as creating
a new Zend_Locale file and parsing CLDR once more. In my opinion there is no
advantage in speed.
Maybe you can give us some measurements on how long Zend_Locale takes on
your machine with the
expected amount of users... I dont think that Zend_Locale is your
bottleneck. I've stresstested the classes and found the implementation quite
fast.
Greetings
Thomas
I18N Team Leader