If you import a lot of records in a database, the Audit function can slow down the import process a lot. Because for each field, Filemaker triggers the plugin and we record all the changes while importing. This is not necessary. So when import and you see this dialog, please make sure the checkbox is not marked:
Now you import and the plugin does not record changes while importing, so it's very fast.
To inform the plugin about your changes and to log them, you now loop over the imported records and call the Audit.Changed function for each record. You can easily find the imported records by checking the AuditState field as it has no value. Use a Set Field script step to set the AuditState field with the result to calling Audit.Changed with the same parameters as in your table definition.
Now the plugin has all entries logged, so it can keep history and you have old values on changes for a later undo/restore operation.