CodeIgniter Forums
Why CI4 is slower than CI3 - Printable Version

+- CodeIgniter Forums (
+-- Forum: CodeIgniter 4 (
+--- Forum: CodeIgniter 4 Discussion (
+--- Thread: Why CI4 is slower than CI3 (/showthread.php?tid=71974)

Why CI4 is slower than CI3 - arisroyo - 10-20-2018

I'm just testing it on the same machine and base on the default welcome page
CI3 Result: Page rendered in 0.0245 seconds. CodeIgniter Version 3.1.9
CI4 Result: Page rendered in 0.1203 seconds. Environment: production

RE: Why CI4 is slower than CI3 - arisroyo - 10-26-2018

Okay It's getting a real good progress.
From CI4 Alpha2: Page rendered in 0.0201 seconds. Environment: production Smile Smile

RE: Why CI4 is slower than CI3 - InsiteFX - 10-27-2018

In your php.ini turn on and setup the php opcache and watch what happens.

From what I found on the web this is where you turn the zend opcache extension on. you need to add this line to php.ini
Change the path to your php_opcache.dll location if not using XAMPP.

; Language Options ;

; Enable the PHP scripting language engine under Apache.
engine = On

;;;zend_extension = php_opcache.dll
zend_extension = C:\xampp\php\ext\php_opcache.dll

Configuring the Zend opcache:

; Determines if Zend OPCache is enabled

; Determines if Zend OPCache is enabled for the CLI version of PHP

; The OPcache shared memory storage size.

; The amount of memory for interned strings in Mbytes.

; The maximum number of keys (scripts) in the OPcache hash table.
; Only numbers between 200 and 1000000 are allowed.

; When disabled, you must reset the OPcache manually or restart the
; webserver for changes to the filesystem to take effect.

; How often (in seconds) to check file timestamps for changes to the shared
; memory storage allocation. ("1" means validate once per second, but only
; once per request. "0" means always validate)


These are the best settings that I have found you need to test the settings for yourself.

Here is a good article on it.

Best Zend OpCache Settings/Tuning/Config

Good luck.