Quantcast
Channel: SCN : All Content - SAP for Mobile
Viewing all articles
Browse latest Browse all 6147

Agentry: Update rule performance

$
0
0

Hi,

 

I have an update rule calculating the total number of hours worked by an employee for each specific day of the displayed week.

 

The screen has 3 tiles:

1 - List view with 7 rows, for each day of the week (the week can be modified)

2 - Time Records for the selected day of the week in the 1st list view

3 - Menu tile with add/edit/remove time records buttons

 

The amount of data is not that much: 28 days/4 weeks and 80 time records in total (this is the worse scenario, normally the employee would have 30-40 time records)

 

The update rule is quite "ugly" because is looping all the time records for each week day 3 times (1 time to get total number of minutes MOD 60, 2 times to get total number of hours adding hours plus minutes DIV 60)

 

So in the worse scenario we have 7 days x 80 time records x 3 loops = 1680 records to go through. It doesn't seem much to me but the result in terms of time is the following:

 

- Change time record to select another from the same day: 4s

- Change week day to list its time records: 10s

- Change week: 24s

 

I know the question requires some analysis is not just a technical doubt but I'm sincerely surprised that an iPad has performance issues due to this rule and I don't find a way to improve it. Below a capture of the aspect of the rule:

 


Viewing all articles
Browse latest Browse all 6147

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>