I also have noticed the lag, but chalked it up to that I am on a not-super-powerful macbook atm.
I have likely on the order of about a thousand crafting machines, of which maybe 100 have quality modules. However, this was happening even when only a handful had quality modules installed.
My suspicion is the rescan
check that occurs twice a second, here is not inexpensive.
While I am not intimately familiar with the plumbing of the mod, it looks like most of the creation/copy-paste/flip/etc hooks should catch modifications, so maybe the frequency on this could be reduced or configurable?
Additionally, if the intent of this is to perform the initial cost changes on mod install, perhaps that could go into a migration script, and then further module installations or removals would be processed as normal? (or maybe there is not a hook available for module changes on crafting machines, which necessitates the frequent rescans?)