ar_transaction_changes icon indicating copy to clipboard operation
ar_transaction_changes copied to clipboard

Suggestion for optimization

Open catmando opened this issue 2 years ago • 1 comments

Has there been any thought to making only work within a transaction?

I.e. if no AR transaction is happening then don't do anything, but once you are inside a transaction then start recording.

This way if you are applying this gem to all models, you maybe don't have to worry as much about efficiency.

catmando avatar Jun 05 '23 18:06 catmando

Further thinking about this... why not just accumulate the active_record previous_changes values until the the transaction is exited? Understand both these suggestions would probably require monkey patching, but still it seems it might be more efficient? Just wondering if this occurred to anyone already

catmando avatar Jun 05 '23 19:06 catmando