adds zend_db_table to my code..
In
http://zfsite.andreinikolov.com/2008/08/zend_db_table-time-overhead-about-25-percents/
http://zfsite.andreinikolov.com/2008/08/zend_db_table-time-overhead-about-25-percents/
this post in my blog I have posted the full code for the tests and have
described exactly what I have done. Here I will post just the results and
the conclusion.
I will be happy if you have notes, arguments and remarks. If I miss
something about Zend_Db_Table and do not use it in the best way - please do
not hesitate to comment :)
I ran the test in 4 different variants. These 4 variants proved to
distinguish one from another in the time they took to run.
These 4 variants are:
1) using Zend_Db_Table without metadata cache
2) using Zend_Db_Table with APC as metadata cache
3) writing the SQL queries directly in the controller, using direct
Zend_Db_Adapter_Mysqli
4) writing the SQL queries in Model classes, using direct
Zend_Db_Adapter_Mysqli
I tested with level of concurency 5 with 100 requests (ab -c 5 -n 100)
Requests per second:
method 3 - writing the SQL queries directly in the controller, using direct
Zend_Db_Adapter_Mysqli: 12.93 rps
method 4 - writing the SQL queries in Model classes, using direct
Zend_Db_Adapter_Mysqli: 12.66 rps
method 2 - using Zend_Db_Table with APC as metadata cache: 10.2 rps
method 1 - using Zend_Db_Table without metadata cache 9.2 rps
conclusion: Zend_Db_Table is not good for heavy loaded web applications. My
personal choice is to go with something like variant 4. The time overhead
here is minimal and the code in the controller is most readable.
--
View this message in context: http://www.nabble.com/Zend_Db_Table-time-overhead---about-25--tp19203345p19203345.html
Sent from the Zend DB mailing list archive at Nabble.com.
没有评论:
发表评论