EOSIO / demux-js-postgres

Demux-js Action Handler implementation for Postgres databases
MIT License
11 stars 10 forks source link

Remove `isReplay` requirement for faster block processing #66

Closed flux627 closed 5 years ago

flux627 commented 5 years ago

Remove isReplay requirement to turn off Cyan Audit and process actions inside database transaction.

chris-allnutt commented 5 years ago

What's the origin of this change?

flux627 commented 5 years ago

What's the origin of this change?

Basically, if the blocks are irreversible, then there's no point in processing them in a transaction, whether we're in replay mode or not. From profiling, there is massive overhead (ha ha) in creating new transactions every block, since massive-js deep clones the massive DB instance every time.