I have recently upgraded to a new server and suspect that the issue is with configuration, the query size is only about 3-5k items however it is routinely taking about 10-15sec to render the below: When debugging the sql, mysql is performing the query very quickly so I believe that this issue is related to the rendering of the data. Server Side processing is enabled for this as well. Any suggestions?
Editor::inst($this->editorDb, 'work_view')
->fields(
Field::inst('work_view.id')
->validator('Validate::notEmpty'), Field::inst('work_view.company')
->setValue($this->session->userdata('companyid')), Field::inst('work_view.date_ord')
->validator(Validate::dateFormat(
'j M Y H:i', ValidateOptions::inst()
->allowEmpty(false)
))
->getFormatter(Format::datetime(
'Y-m-d H:i:s', 'j M Y H:i'
))
->setFormatter(Format::datetime(
'j M Y H:i', 'Y-m-d H:i:s'
)), Field::inst('work_view.date_start')
->validator(Validate::dateFormat(
'j M Y H:i', ValidateOptions::inst()
->allowEmpty(false)
))
->getFormatter(Format::datetime(
'Y-m-d H:i:s', 'j M Y H:i'
))
->setFormatter(Format::datetime(
'j M Y H:i', 'Y-m-d H:i:s'
)), Field::inst('work_view.date_due')
->validator(Validate::dateFormat(
'j M Y H:i', ValidateOptions::inst()
->allowEmpty(false)
))
->getFormatter(Format::datetime(
'Y-m-d H:i:s', 'j M Y H:i'
))
->setFormatter(Format::datetime(
'j M Y H:i', 'Y-m-d H:i:s'
)), Field::inst('work_view.date_del')
->validator(Validate::dateFormat(
'j M Y H:i', ValidateOptions::inst()
->allowEmpty(false)
))
->getFormatter(Format::datetime(
'Y-m-d H:i:s', 'j M Y H:i'
))
->setFormatter(Format::datetime(
'j M Y H:i', 'Y-m-d H:i:s'
))
->validator('Validate::notEmpty'),
Field::inst('work_view.customer')
->validator('Validate::notEmpty'),
Field::inst('work_view.desc')
->validator('Validate::notEmpty'),
Field::inst('work_view.role_name')
->validator('Validate::notEmpty'),
Field::inst('work_view.approved')
->validator('Validate::notEmpty'),
Field::inst('work_view.note'),
Field::inst('work_view.name')
->options(Options::inst()
->table('customer')
->value('id')
->label(array('cname', 'fname', 'lname'))
->render(function ( $row ) {
if ($row['cname'] != null) {
return $row['cname'];
} else {
return $row['fname'] . ' ' . $row['lname'];
}
})
->where(function ($q) {
$q->where('customer.company', $this->session->userdata('companyid'));
})
)
->validator('Validate::notEmpty'), Field::inst('customer.cname')
->validator('Validate::notEmpty'), Field::inst('customer.fname')
->validator('Validate::notEmpty'), Field::inst('customer.lname')
->validator('Validate::notEmpty')
)
->leftJoin('customer', 'customer.id', '=', 'work_view.name')
->where('work_view.company', $this->session->userdata('companyid'))
//->debug(true)
->process($post)
->json();
break;