Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » Performance Issues v1.97 - 2.0 with list screens
Performance Issues v1.97 - 2.0 with list screens [message #5923] Sat, 01 October 2016 23:22 Go to next message
renato is currently offline  renato
Messages: 4
Registered: October 2016
Junior Member
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?
Re: Performance Issues v1.97 - 2.0 with list screens [message #5924 is a reply to message #5923] Sun, 02 October 2016 05:48 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2371
Registered: April 2006
Location: Surrey, UK
Senior Member
If you look at that code you should see the following lines:
    if (!array_key_exists($fieldname, $screen_fields)) {
        // field does not exist in this screen, so skip next bit
    } else {

The variable $screen_fields identifies all the fields from the current entity which are displayed in the current screen, so if a popup field is contained on the current screen then it will execute the code which obtains the tooltip for that field.

Do you have any of these popup fields shown in the LIST area?


Re: Performance Issues v1.97 - 2.0 with list screens [message #5925 is a reply to message #5924] Sun, 02 October 2016 09:03 Go to previous messageGo to next message
renato is currently offline  renato
Messages: 4
Registered: October 2016
Junior Member
The Fields that should have a popup are indeed in the LIST1 screen as a column.
I don't see a pop-up button in the LIST area, if that's what you meant.

That peace of code only skips if the field is not displayed on screen.
In the case of a LIST1 the fields are displayed, but as read only(so a pop-up button with tooltip is not necessary).

What happens now is: The tooltip code executes for each row and each pop-up field in the LIST1 area. This is not necessary because LIST1 is for display only, no pop-up buttons.

I understand that you can have pop-up buttons in MULTI screens and detail screens.





Re: Performance Issues v1.97 - 2.0 with list screens [message #5927 is a reply to message #5925] Mon, 03 October 2016 05:17 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2371
Registered: April 2006
Location: Surrey, UK
Senior Member
I normally remove the 'control' setting in the $fieldspec array when I want to remove the popup processing, but I've changed the code slightly so that if it detects that the screen zone is 'noedit' then it will skip all popup processing automatically. Try the attached file and let me know if it works.

Re: Performance Issues v1.97 - 2.0 with list screens [message #6309 is a reply to message #5927] Sun, 16 April 2017 03:41 Go to previous messageGo to next message
apmuthu
Messages: 30
Registered: April 2017
Location: Chennai Singapore
Member
Hope this functionality has been incorporated into the file includes/include.xml.php5.inc by now.
Re: Performance Issues v1.97 - 2.0 with list screens [message #6313 is a reply to message #6309] Sun, 16 April 2017 05:31 Go to previous message
AJM is currently offline  AJM
Messages: 2371
Registered: April 2006
Location: Surrey, UK
Senior Member
Yes, it has.

Previous Topic: Duplicate Oracle file removal
Next Topic: Change to 2000-01-01 00:00:00 everywhere
Goto Forum:
  


Current Time: Wed Dec 11 17:47:12 EST 2024

Total time taken to generate the page: 0.01225 seconds