webpack - Electron.remote.require('sqlite3') query performance 5x slower, callback 500x slower -
i'm using electron w/ webpack , try add sqlite3
mix. see stripped down test project
i came accross 2 possible solutions.
when
require('sqlite3')
inindex.html
, create global variable referencing database, can query db within application using global variable. performance ok.issues: using global variable feels ugly , cannot seem configure karma use scenario.
question: how should configure karma (tried both
files
,customcontextfile
options) unit-test scenario?when use
remote.require('sqlite3')
in application, database can opened/created, performance of queries degrade factor ~10 , performance of results callback down ~500x. (i guess it's memory allocation issue)issues: sqlite useless performancewise.
question: why performance degradation occur , how solve use benefits of sqlite?
btw. when using import { database } 'sqlite'
const db = new database()
node-gyp , node-pre-gyp throw issues haven't been able solve.
nb. have been using sql.js
(performance issues) , lovefield
(inflexible indexeddb store) alternatives sqlite3.
Comments
Post a Comment