|
|||
|
Hi everyone,
I am considering adopting Zend_Translate to replace an in-house PHP translation engine, but was bewildered by the wide choice of translation backends. To weed out the chaff, I ran a performance test of various back-ends. I thought others might be interested in the results, so I am posting them here. The method was as follows: - A vmware server running a standard install of Zend Core 2.5 - A generate script to create translation files containing 10.000 items - A speed test script that loaded and echoed 1000 translations from these files. I ran this speed test script through the microsoft web app stress tool, for a single-threaded run-time of 30 seconds (warm-up time of 5 seconds), and got the following mean time to last byte (in milliseconds): - Direct array lookup: 36.54 - Zend_Translate + Array: 61.30 - Zend_Translate + CSV: 189.97 - Zend_Translate + Gettext: 446.15 - Zend_Translate + TMX: 1966.20 In the attachment you will find the generate and test scripts. My conclusions from this are: - Zend_Translate's overhead is very reasonable (I will be adopting it). - CSV offers a good trade-off between convenience of translation and performance. - TMX is stupendously slow (as expected). - Gettext is surprisingly slow, given that it is recommended so often. I duplicated this test just to double-check, but the results are accurate. I didn't test Xliff, because I assumed the performance would be comparable to TMX. Feedback? Suggestions? |
![]() |
| Thread Tools | |
| Display Modes | |
|
|