Welcome Guest, Not a member yet? Register   Sign In
Update 4.4.1 makes it slower
#1

(This post was last modified: 09-20-2023, 05:19 AM by LuxesR.)

I've updated from CodeIgniter 4.3.6 to 4.4.1. But it seems much slower. Like 2 seconds more load time. I've checked it on the same environment. 
Is there a setting I missed? I've added setAutoRoute on true to Routes.php (and $autoRoutesImproved in Feature.php on true as well)

Also, this doesn't seem to work anymore:

Code:
$this->Invoices = new Invoices_model();

So, I changed to this:
Code:
$this->Invoices = new \App\Models\Invoices_model();

Which all works fine, but it's slower. The rest is pretty much the same as it was before. Hope someone can help me.
Reply
#2

I'm using this now:
Code:
$this->Invoices = model('Invoices_model');



Instead of this:
Code:
$this->Invoices = new \App\Models\Invoices_model();


It's now as fast as it was before the update. So I sort of fixed it myself. Any idea why it was that slow before?
Reply
#3

(This post was last modified: 09-20-2023, 03:44 PM by kenjis.)

I have no idea.

If you instantiate Invoices_model once, `new \App\Models\Invoices_model()` seems to be faster.
If `new Invoices_model()` does not work in v4.4, it seems it does not work in v4.3.
Reply
#4

(09-20-2023, 01:26 PM)kenjis Wrote: I have no idea.

If you instantiate Invoices_model once, `new \App\Models\Invoices_model()` seems to be faster.
If `new Invoices_model()` does not work in v4.4, it seems it does not work in v4.3.

I simply replaced it with new \App\Models\Invoices_model(). So I think the problem was that I instantiate it every time. If I instantiate it at the top in every controller and model, it might be faster. I tried it in one file manually, but without result. I didn't do it in the other files, so maybe if I did this in every controller and model, it might be even faster. But it would be way too much work for now.
Reply
#5

If you instantiate Invoices_model many times in a request, model('Invoices_model') would be faster.
Reply
#6

If your on a Windows Ssytem it could be one of Microsoft's updates that fixed a Security leak in the Core
with the Intel CPU's.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#7

I work on a Mac, so that's not the issue. If what Kenjis says it true, then it makes sense.
Reply
#8

Ok, I just mentioned that because I was not sure what OS you were using.

It's called Intel Downfall and effects all CPU's before 14th gen.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB