Welcome Guest, Not a member yet? Register   Sign In
Performance Lag in Codeigniter 4.4.5 Pagination

(This post was last modified: 02-18-2024, 10:11 AM by Corsari.)


This makes me crazy

I'm facing a performance issue and would appreciate some insights. 

I have a PHP application that I've implemented in vanilla PHP (using PDO and Zebra Pagination) 

in these days I have rewritten it in Codeigniter 4.4.5 on the same host. 

The app is a simple CRUD app and it displays those rows from a MariaDB database with 700 rows, paginated at 10 rows per page, from a table with just and only 7 columns.

Here's the problem: when browsing the paginated pages, the vanilla PHP app changes pages instantly, but the Codeigniter 4.4.5 version has an unexpected lag of more than 1.5 seconds.

  • Host: Linux-based
  • PHP versions tried: 7.4 and 8.0.23 (no difference observed)
  • MariaDB version: 10.3.32
I've set up virtual hosts, allowing both applications to be simultaneously usable as I'm on a LAN and the server is a local PC: mean I'm comparing the behavior live and direct simultaneously

Any suggestions on what I should check to identify and resolve this performance lag in the Codeigniter application?

Thank you for your assistance!

Details about the main view

the Model is the default created with spark

in the controller the index() method is just

PHP Code:
    public function index()
        $data['rows'] =  $this->modelChiamate->orderBy('data''DESC')
['pager'] = $this->modelChiamate->pager;

        return view('index'$data);

My mistake. 

Using the developer tools, I realized that the debug bar was still enabled  Cry ... its icon was right in front of me, but I overlooked it. 

I was in development mode, and the debug bar was causing a 1-second delay.


PHP Code:
// Always applied before every request
public $globals = [
    'before' => [
        // 'csrf',
    'after'  => [
        'toolbar'// Remark this out to not use in debug mode.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

See https://www.codeigniter.com/user_guide/i...figuration

Theme © iAndrew 2016 - Forum software by © MyBB