• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unfortunately, codeIgniter series v3.0 slower than series v2.0 twice.

#1
I have used codeigniter started from series 2 and so far.

But I have noticed the beginning of codeigniter series v3.0, became slower than series v2.0.
And for this reason in my opinion, codeigniter has lost very powerful feature, namely the speed.
And in order to prove it, I've created a simple application using version 2, and another copy of the same application using version 3

When loading the page at the first time, the version 2 recorded (0.5000) of speed, while the version 3 recorded (1.5000) of speed.
as you seen the difference is double times.
Also when refresh the page at the second time, the difference is still the same, v2.0 recorded (0.3500), v3.0 recorded (0.8000).

Screenshot for version 2.2.1
[Image: I6FudS0EQ.jpg]

Screenshot for version 3.0rc3
[Image: bwS4KzwB.jpg]

I think in my opinion version 3.0 come up with some improvements, but has lost more speed.
Reply

#2
Give us some evidence of this behavior...
Reply

#3
I just ran a quick benchmark and he's right. Here's what I got running stock downloads of each on the same PHP version, and both with XDebug running using Apache Bench with the following command
Code:
ab -n 1000 -c10
.

And here's the results that I got:

* CI 2.2.1 - 120.23 requests per second
* CI 3.0-RC3 - 65.07 requests per second.

What is causing it? Not sure yet - ran it through a quick profiler but it will take time to dig into things and find improvements. My guess is that we won't find too many improvements until after 3.0 is released since it's going out the door any day now.

Thanks for pointing this out, though.
Support Development  • Practical CodeIgniter 3  •
Myth:AuthVulcan - CLI Tools for CI4
Reply

#4
Yes thats true. CI 3 little bit slower than CI 2
The largest Bengali tutorial site on Web Development in this planet
Reply

#5
@lionking thanks for the screenshots... so we have slower framework but still one of the fastest.
Reply

#6
Yes, CI3 is slower. I think it is related to some extra files being loaded and code being executed which is new. The lag might be in router I think.
Reply

#7
@rejoan: "it is not just little slow" <-- it is slower five times compared with CI v2.2.1 as in the screenshot.

@ircdirk: "so we have slower framework but still one of the fastest." <-- this is just the beginning, it has lost five times of speed compared with CI v2.2.1

@gaurav_ch: Maybe yes or maybe other things.


I Hope to start in solving this problem, because if were ignored, Codeigniter will lose a lot of its popularity.
Reply

#8
A single page load of each cannot tell you the true difference in speed. There are too many variables that affect how fast it will go. Using something like Apache Bench, which I provided my results from before, is much more accurate because it averages the speed based on several hundred requests. This helps to remove many other variables you cannot control, like what else was happening on the server at the time, etc.

So - your 5x slower statement is wrong. According to the AB results I post earlier, a raw startup is nearly 2x slower. With your application, it's impossible for us to diagnose what is making it slower because there are so many variables involved. It could be a slower Query Builder, or cache driver, changes to your code when you made the conversion from 2.x to 3, etc.

While we will definitely look into speed issues, there's many things that aren't answered by your post that would be needed to even begin, like:

- are they running the same PHP version
- are the servers identical
- same DB version and table types?

Then, it would be helpful if you would start the process of diagnosing on your own application the slow parts. You can do this by profiling with XDebug and viewing the results in KCachegrind or Webgrind, or using a different profiler altogether. Let us know when you can narrow down the area that's really slower and that will help us know which areas to look into. And they have to be repeatably slower, not just once.
Support Development  • Practical CodeIgniter 3  •
Myth:AuthVulcan - CLI Tools for CI4
Reply

#9
Perhaps 2x, 3x, 4x.. times is too much as difference. How ever its normal to have it slower in future versions.
By default when some code is increasing, its speed is decreasing..
Best VPS Hosting : Digital Ocean
Reply

#10
Since I have my development site configured to switch between CI2 and CI3 by changing one line of code, I tried a comparison of loading the site's main page once in CI2 then again in CI3 (without logging into the site) and got the following wildly inaccurate and relatively useless (but mildly interesting) data:
- CI2: Page rendered in 0.0612 seconds, using 2.93MB.
Load Time: 61.2ms, Memory Used: 3.08 MB, Database: 16 Queries, Files: 134
- CI3: Page rendered in 0.0770 seconds, using 3.06MB.
Load Time: 77ms, Memory Used: 3.26 MB, Database: 17 Queries, Files: 141

My development site is also missing a number of performance optimizations which would improve the performance of both versions, which should be obvious from the load time and number of database queries. Of course, I don't have XDebug enabled at the moment (or the load times would be 2-5 times those numbers). I've always enjoyed the discrepancy between {memory_usage} and Bonfire's profiler's reporting of memory usage.

The difference in the number of queries is due to the session library being configured to use database sessions, which is something I may change before I actually move my site to CI3 for production.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.