Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-08-2008, 10:08 AM
Junior Member
 
Join Date: Jun 2008
Posts: 18
Default Zend_Translate CSV versus Gettest Benchmarking

I have done some testing and benchmarking.
CSV - .mo (gettext)
First test set - identical translations.
==================================
;;;;;;;;;;;;;;;;;;;;;;Testing CSV;;;;;;;;;;;;;;;;;;;;;;;;;;
==================================
5000 translations. Single words no longer then 10 letters each.
The CSV file size: 120K
Five tests:
1:0.18561601638794
2:0.14141798019409
3:0.13992500305176
4:0.13213515281677
5:0.1428120136261


5000 translations. Multiple long string words about 15 words each.
The CSV file size: 1.6Mb
Five tests:
1:0.17582893371582
2:0.17163300514221
3:0.1882631778717
4:0.20854091644287
5:0.17210984230042


---
I then converted the CSV into .PO then from PO to MO

==================================
;;;;;;;;;;;;;;;;;;;;;;Testing GETTEXT;;;;;;;;;;;;;;;;;;;;;;;;;;
==================================
5000 translations. Single words no longer then 10 letters each.
The MO file size: 194K
Five tests:
1:0.20350193977356
2:0.20002007484436
3:0.20459699630737
4:0.20647192001343
5:0.20419096946716


5000 translations. Multiple long string words about 15 words each.
The MO file size: 1.6Mb
Five tests:
1:0.21402502059937
2:0.22229099273682
3:0.21480894088745
4:0.21827602386475
5:0.21279406547546


--=======================

What does this tell us?
I really don-t know.

A few observations can be drawn out however. Using CSV the standard deviation of spread is far greater. It appears as though you get a lot more consistent times with MO files.

Interestingly it looks as though CSV are somewhat faster.
Even for the smaller files which suprised me.

I ran one more test on a 8Mb .mo I downloaded the entire POT file for the KDE developers environment and compiled it in the .MO
8.5M .mo run time - > 3.964830160141
I tried to convert the PO to a CSV but couldnt, so I had to make my own huge CSV.
This CSV had 30k rows (ALOT more then the PO) and was larger in file size. And it still performed 4 times better.

10Mb CSV run time - >0.97681403160095

============================

My question is, why is it performing better when Gettext is understood to be the best performer?

Last edited by Kalyse : 06-08-2008 at 10:26 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-10-2008, 12:42 PM
Junior Member
 
Join Date: Apr 2008
Posts: 6
Default

The current development version of zend framework has a rewritten CSV engine that should be a lot faster (it uses fgetcsv instead of parsing the csv file itself).

As to your question about how csv could be faster than gettext when the reverse is claimed? I would guess that nobody actually tested it and everyone just assumed that because gettext is faster on natively compiled platforms, it would be faster on PHP also.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-18-2008, 12:38 PM
Junior Member
 
Join Date: Aug 2008
Posts: 2
Default

Hey Kalyse,

just wanted to say 'thank you' for
publishing your results of the performance tests.

Have a nice day!
GillBates

P.S.: Excuse my bad english - feel free to correct me if I'm wrong...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:26 PM.