Executing the 'Post Timesheets' job is slow due to the way the application is calculating the cost curves. The implementation of the cost curve calculation in posting added a major inefficiency to the posting job. Within the processing of each time entry, posting is calculating the cost curve data for each team member on the associated project over and over again. For example, we have a project called, project1, and we have 100 resources on the project team. If the project has 10 tasks and 50 resources track time to 5 of those 10 tasks, the current logic would calculate the all the team members' cost curves a total of: 50 * 5 = 250 times, and that would be done for the full set of the 100 resources. This should not be. We should only calculate costs per resource rather than the whole team in the time entry processing loop. (this whole thing could even be more efficient if we batched cost calculations outside of this loop)
Steps to Reproduce:
- Create a project, add 100 team members and 10 tasks with assignments
- Have 50 team members submit time entries to 5 tasks
- Execute the 'Post Timesheets' job
Expected Result: Posting time per timesheet should be less than 1 second.
Actual Result: It can take approximately 1 to 3 seconds to post one timesheet for this scenario.
Resolved in 12.0.6 Generic Patch. Reference TEC522707
Resolved in 12.1.0 Generic Patch. Reference TEC542313
Resolved in 12.1.2 Generic Patch. Reference TEC572267
Resolved in 12.1.3 Generic Patch. Reference TEC570813
Resolved in 13.0.1 Generic Patch. Reference TEC572268
Resolved in 13.1.0
Keywords: CLARITYKB, CLRT-65974, tma, posting, performance, clarity12resolved, clarity13resolved.