CodeIgniter Forums
Does CI4 is as fast as CI3 or it is under testing? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forum-31.html)
+--- Thread: Does CI4 is as fast as CI3 or it is under testing? (/thread-71281.html)



Does CI4 is as fast as CI3 or it is under testing? - vinay_ethane - 07-26-2018

As i am seeing most of the ci4 development is done and may be official release is coming soon. My Reason to ask this question is to start my new project on ci4 if the performance is same as CI3. I can go with Phalcon but i cannot trust their community for future support. Please Help. I am seriously stuck.


RE: Does CI4 is as fast as CI3 or it is under testing? - php_rocs - 07-27-2018

@vinay_ethane,

Here is a thread that might assist you in your decision. https://forum.codeigniter.com/thread-70912.html


RE: Does CI4 is as fast as CI3 or it is under testing? - kilishan - 07-27-2018

No strict performance tests have been made between the two, but overall I'm very happy with the performance. It's been a while since I've worked on a CI3 project but the out of the box, "Hello World", example match what I remember from CI3. I think the database engine might have gotten a little bit slower, but I have yet to go back in and start optimizing anything there, so I would expect that to improve in the future.


RE: Does CI4 is as fast as CI3 or it is under testing? - anthos1984 - 07-28-2018

I'm also happy with CI4 performance. But looking the toolbar says "80 files" worries me. Also I've encounter php error on my controller script and saw call stack up to 12 rows. While usually saw 6 to 8 rows on CI3.


RE: Does CI4 is as fast as CI3 or it is under testing? - kilishan - 07-28-2018

If you're happy with performance, why fretting over the number of files loading?

Yes, the framework is a little more flexible now, which requires a slitghtly different structure to the files, and often has more of them the CI3 would have used. If your site's not getting slow, though, don't worry about it. Smile


RE: Does CI4 is as fast as CI3 or it is under testing? - dave friend - 07-29-2018

(07-28-2018, 12:11 AM)anthos1984 Wrote: I'm also happy  with CI4 performance. But looking the toolbar says "80 files" worries me. Also I've encounter php error on my controller script and saw call stack up to 12 rows. While usually saw 6 to 8 rows on CI3.

The server of a production site should be using an OpCode cache system of some flavor. OpCode cache solutions store precompiled script bytecode in memory during the first execution of a specific PHP file.

Don't forget that servers are designed to... well, serve files, lots of files, very quickly.


RE: Does CI4 is as fast as CI3 or it is under testing? - skunkbad - 07-29-2018

(07-28-2018, 12:11 AM)anthos1984 Wrote: I'm also happy  with CI4 performance. But looking the toolbar says "80 files" worries me. Also I've encounter php error on my controller script and saw call stack up to 12 rows. While usually saw 6 to 8 rows on CI3.

Anytime you're feeling bad about performance, number of files loaded, or number of queries loaded, just think about how there are so many websites using WordPress, and how terrible that is. It should make you feel better. I'm working on a WordPress website right now, and the owner has 48 active plugins. MySQL log shows that loading the home page results in 154 queries. Trust me, you could use CI4 and it's not going to be the limiting factor.


RE: Does CI4 is as fast as CI3 or it is under testing? - zurtri - 07-29-2018

48 active plugins?

I feel your pain.


RE: Does CI4 is as fast as CI3 or it is under testing? - anthos1984 - 07-29-2018

(07-29-2018, 05:47 AM)dave friend Wrote: The server of a production site should be using an OpCode cache system of some flavor. OpCode cache solutions store precompiled script bytecode in memory during the first execution of a specific PHP file.

That is what I wanted to. But seems not supported for now (for PHP).
Being desktop and embedded system programmer, that what I usually did. The program running fast because it compiled before and running as machine code. No matter how complex OOP code you have, the compiler did the optimization.
You create using complex OOP (  Heart this) or simple assembly language (with headache Smile ), the result is same.

As for website, the optimization I can do is minifying CI views, js, css and everything CI can offer to increase performance (class_map, balancing router rules vs auto route, view caching,etc (please show me if there is more))


RE: Does CI4 is as fast as CI3 or it is under testing? - dave friend - 08-02-2018

(07-29-2018, 08:35 PM)anthos1984 Wrote: That is what I wanted to. But seems not supported for now (for PHP)..

Look into OPcache.