require './includes/controllers/individual_ctrl.php';
// We have finished writing to $_SESSION, so release the lock
session_write_close();
$controller=new IndividualController();
$controller->init();
but family.php stats out
require_once 'includes/controllers/family_ctrl.php';
$controller = new FamilyController();
$controller->init();
Does it also need a close?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can close the session any time after you have finished writing any session variables.
Doing so releases the "session lock", and allows other pages to load.
It is required on pages that load using ajax (e.g. index.php and individual.php). This allows the component parts to load in parallel instead of sequentially.
If family.php doesn't try to set any session vars (either directly, or in a called procedure), then yes you can add it. It may give an advantage if you want to load another page in a different tab/window while the family page is loading.
So far, I only added it to the pages that had noticable performance issues.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
individual.php starts out with
require './includes/controllers/individual_ctrl.php';
// We have finished writing to $_SESSION, so release the lock
session_write_close();
$controller=new IndividualController();
$controller->init();
but family.php stats out
require_once 'includes/controllers/family_ctrl.php';
$controller = new FamilyController();
$controller->init();
Does it also need a close?
You can close the session any time after you have finished writing any session variables.
Doing so releases the "session lock", and allows other pages to load.
It is required on pages that load using ajax (e.g. index.php and individual.php). This allows the component parts to load in parallel instead of sequentially.
If family.php doesn't try to set any session vars (either directly, or in a called procedure), then yes you can add it. It may give an advantage if you want to load another page in a different tab/window while the family page is loading.
So far, I only added it to the pages that had noticable performance issues.
OK, just wondering.
I had no idea what the effect would be, but the difference caught my attention.