Hi Tony,
I'm getting performance issues in list views and multi5 views. Some LIST1 screens taking as much as 21 seconds to render (when showing 100 records) and 5 seconds for 25 lines
I narrowed it down to this peace of code in 'include.xml.php5.inc' -> addData2XMLdoc:
if ($spec['control'] == 'popup') {
if (!array_key_exists($fieldname, $screen_fields)) {
// field does not exist in this screen, so skip next bit
} else {
$child->setAttribute('control', 'popup');
if (isset($spec['foreign_field'])) {
$child->setAttribute('foreign_field', $spec['foreign_field']);
} // if
if (isset($spec['task_id'])) {
if (!empty($dbobject->zone) AND $dbobject->zone != 'main') {
// include zone name in task_id
$zone = 'db'.$dbobject->zone;
$child->setAttribute('task_id', "task#{$zone}#{$spec['task_id']}");
} else {
$child->setAttribute('task_id', "task#{$spec['task_id']}");
} // if
$taskOBJ =& RDCsingleton::getInstance('mnu_task');
$task_data = $taskOBJ->getData("task_id='{$spec['task_id']}'"); // <------------- Line causing performance problems
if(!empty($task_data)) {
$task_data = $task_data[0];
$child->setAttribute('tooltip', $task_data['task_desc']);
} //if
} // if
if (isset($spec['allow_input'])) {
$child->setAttribute('allow_input', $spec['allow_input']);
} // if
} // if
} // if
If I comment that line rendering goes down to 1.2 seconds for 100 records.
And down to 0.7 seconds when showing 25 records.
The table I'm testing on contains 5 popups for the insert/update screen.
If I change it to getData_raw it's still 8 seconds for 100 records. (a bit better).
What's the purpose of doing that database call? Just for the tooltip?
Shouldn't this be done only for ADD/Update/MULTI screens? not for LIST1/LIST2
I think that extra database call causes the delay in list screens.
Will something else break if I comment that line for now?