Tracking Directives Execution Time

Hi !

A few years ago, I learned about the danger of Data Directives on JobXXX tables. We had changelogs without any filter condition that would more than triple our MfgLeadTime & MRP execution time.

We still have a Change Log on JobHead to track some fields like the Released checkbox, but we added a condition in the Data Directive to exclude Unfirm Jobs.

Looking at the new Activity Tracking dashboard, I now clearly see that this JobHead changelog is being called millions of times a month. Obviously, these millions of calls do happen, but they are being filtered by the condition to exclude Unfirm Jobs.

Is there a way to completely avoid Data Directives from being called by the MRP?

Decompiling the MfgLeadTime & MRP DLLs, I see Epicor making some calls to disable triggers and changelogs. I was wondering if someone know more about this.

ChgLogHandler.DisableChangeLogTracking((string) null);

((IceDataContext) ((ContextBoundBase<ErpContext>) this).Db).DisableTriggers("JobHead");
((IceDataContext) ((ContextBoundBase<ErpContext>) this).Db).DisableTriggers("JobAsmbl");
((IceDataContext) ((ContextBoundBase<ErpContext>) this).Db).DisableTriggers("JobMtl");
((IceDataContext) ((ContextBoundBase<ErpContext>) this).Db).DisableTriggers("JobOper");

A simple way would be to have one user or a special userid run MRP and that person was excluded in the DataDirective.

I am looking for a solution that would not affect the ActivityCount of the Data Directive. Any condition at the beginning of the DD will still count.

You could disable the data directive as a performance benchmark and compare with them enabled. If the difference is significate for you, look to moving items to methods directives. If it’s change logs that are only done in data directives if you skip them with a special userid I suggested you have the activity count but this could give you the performance back because your not writing the record.