Just in case anyone is interested, I’ve just finished rewriting a website from CakePHP (1.3.2) into CodeIgniter (1.7.1).
As this is a client site, I can’t really release any of the code for it, suffice to say that both sites are accessing the same MySQL database - the same tables - using MySQLi driver, so its relatively safe to say that the framework is being tested.
The code accesses the database, loads the content of one page, then performs a series of other queries to select some content for menus and sidebars. In total CakePHP is performing 12 queries, and CodeIgniter 11.
CodeIgniter is using DataMapper DMZ for all of the model functionality, CakePHP is using its built in ORM.
Both sites have the bare minimum of libraries/helpers loaded for the functionality.
Both are testing using AB - “ab -n 1000 -c 10 etc etc” being the bare functions. If anyone wants it run again with other options I’d be happy to oblige.
So, if anyone is interested in the score then here we go:
CakePHP:
Concurrency Level: 5
Time taken for tests: 163.970 seconds
Complete requests: 1000
Failed requests: 3
(Connect: 0, Receive: 0, Length: 3, Exceptions: 0
Write errors: 0
Total transferred: 5258574 bytes
HTML transferred: 4918596 bytes
Requests per second: 6.10 [#/sec] (mean)
Time per request: 819.851 [ms] (mean)
Time per request: 163.970 [ms] (mean, across a
Transfer rate: 31.32 [Kbytes/sec] received
CodeIgniter 1.7.1
Concurrency Level: 5
Time taken for tests: 11.004 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 5264678 bytes
HTML transferred: 4921926 bytes
Requests per second: 90.88 [#/sec] (mean)
Time per request: 55.020 [ms] (mean)
Time per request: 11.004 [ms] (mean, across all
Transfer rate: 128.06 [Kbytes/sec] received
Wow
To be honest, I think CakePHP is suffering a little on my local machine (performing this on a PC laptop rather than my normal Mac), but the difference is blinding. I would describe myself as an experienced CakePHP coder, and an inexperienced CodeIgniter coder, so I’d guess someone else could squeeze some more out of it.
That is a pretty comprehensive beating there, and I’m slightly at a loss as to why its so bad. Neither framework has caching enabled on those results, so there isn’t a false positive coming from the CodeIgniter there.
Got to say, I’m hugely impressed - and excited to see what CodeIgniter can do once there is some caching installed and running.
PS The spec on this laptop is AMD Athlon X2 QL65 2.1Ghz running 4gig of RAM on Windows Vista Ultimate with Wampserver 2.0 running PHP 5.3.0
