Hi folks,
I’ve been trying to solve an issue where creating sales order via the REST API can be very slow.
To diagnose this issue, I enabled the request profiler and used it observe that--in addition to very large SQL counts and CPU time--the slow requests are generating exactly three exceptions per detail line: two System.InvalidCastExceptions and one PX.Objects.IN.PXUnitConversionException. Not exactly a smoking gun, but it does seem suspect to me (I don’t think we should be generating these exceptions, no?). Perhaps some data was stored in the wrong format (i.e. a string being sent where an integer is expected)?
Drilling down into the exception details, it looks like the source of some exceptions may be from PX.Objects.IN.PXQuantityAttribute.CalcBaseQty; but I’m not sure where to go from here. Is there a way I can determine exactly which attributes are being set? Maybe that will help me locate the offending data format mismatch. Failing that, anyone have tips for tracking down the cause of slowdowns when creating large sales orders?
Thanks!