The package refresh schedule on the Parent NS is taking more than 24 hours to complete and therefore in a perpetually running state.
There were some optimizations needed for some stored procedures and in the code.
spGetAutoAssignInfoForPackage was 300ms, now around 220 ms
Added new index to the SWDAdvertisement table on (_Latest, ProgramId) include AdvertisementId
Added primary key (ResourceTargetGuid, FilterGuid) to #AdvResTargetsAndFilters temp table
spSetPackageServers was 65ms, now 24
Installed vComputerResourceEx from 7.5 and updated references from vComputerResource to vComputerResourceEx
The original spGetAdvertisementsUsingPackagewas taking 65ms, modified spGetAdvertisementsUsingPackage takes 1ms.
The change was to eliminate all "lower()" function calls from this procedure
Eliminating [Altiris.NS.StandardItems.SoftwareDelivery.SWDSupport : Void -> EnsurePackageShareVirtualDirectory()] call when not needed will cut several hours off the time
[CreateFolderSnapshot(string packageLocation, string relativePackageLocation, out long totalSize, bool copyMapFile)] method in SWDSupport.cs is taking twice less time
Eliminating fileInfo.Length method double call in cycle (so access and cache the Length property value only once)
Fixed as of ITMS 7.5 SP1 and ITMS 7.1 SP2 MP1 Rollup v10 (HOWTO81832).
ITMS 7.1 SP2 MP1 and later