duality-labs / hapi-indexer

A Node.js based indexer for the Duality Cosmos chain
1 stars 0 forks source link

Replace node-sqlite with better-sqlite3 #46

Open dib542 opened 1 year ago

dib542 commented 1 year ago

Related to improving the indexer transaction import speed issue:


It is possible that we could replace the standard sqlite, sqlite3 packages setup with better-sqlite3.

Initially this seemed difficult to achieve and I had some issues with building the better-sqlite3 binary in an Alpine Docker / ARM environment. This shouldn't have been difficult because better-sqlite3 ships with specific armv7 binaries for Alpine Linux. Either way, I did manage to get it running in a test branch recently (using a Debian linux container) so maybe that is a good path forward and maybe the import speed can be improved.