We are seeing delays of around a minute in MES when clicking “Start Production Activity” (until the dialog comes up) and also things such as, if “Cancel” is immediately clicked, or after clicking “Ok” for “End Activity”.
I ran tracing and found that the delay in “Start Production Activity” was almost entirely due to Labor.GetByID, which is taking 55.5 seconds to run! If I immediately click “Cancel”, Labor.GetRows is taking 56.0 seconds to run. This is approximately equal to how long it takes to run without tracing. The trace log returned contains over 3,000,000 lines of XML, most of which are LaborDtl records in GetByID and GetRows. If I run SELECT * FROM LaborDtl WHERE EmployeeNum=<myid>
against the database (MS-SQL) it takes around 0.6 seconds and returns 2810 rows of 132 columns each.
There are no BPMs on either of these methods, nor are there any data directives for any labor table. What could be taking long and how can this be sped up? My initial suspicion when seeing the size of the 140MB log file was that it was taking a long time to serialize and send the data between the server and the client; still, it only took about 2 seconds to transfer the log file to a faster machine for closer analysis, and of course the database query taking less than 1 second didn’t seem to suggest the database was a problem.