Slow response from tmBuildTargetDeviceCache and tmGetTargetDeviceCache
Last Updated January 14, 2019
These are some of the scenarios noticed with some customers:
Customer reported that while trying to search for a computer name under Quick Run for any of their tasks is taking too long to load (some times more than one minute).
As well while trying to drill-down to any of the already executed tasks from the list under Task Status is taking a long time to populate the computer list.
If a user with limited rights tries to add a schedule to a computer to run a task, it usually times out or load after 1 hour.
In some instances it even locked the Internet Explorer page.
After looking at the profiler trace, we identified that tmBuildTargetDeviceCache and tmGetTargetDeviceCache stored procedures were the main culprits.
tmBuildTargetDeviceCache was taken in some instances up to 220762.7 ms for example.
In this particular case the customer had too many obsolete resource types from previous installations, as well he had too many security groups causing the scoping checks to take too long.
This issue has been resolved in 8.0 HF2 - See release notes for more information DOC9343
This issue has been fixed with our ITMS 8.0 HF2 release.
NOTE: However, attached to this article is a revised version of the stored procedure that will be included in Post-SMP 8.5 RU1 release. This version eliminates scoping based on all possible objects and, instead, reduces the number of items down to just scoped collections only. This suggested change should work for 8.1 RU7, 8.5, and 8.5 RU1