nedb
nedb copied to clipboard
Loading time is too long
ENV
- Browser:Chrome for android latest
- System:Android 8.1
Problem
Initial loading time too long,50s-80s
Code
console.time(`[NEDB] Table "${table_name}" load cost time:`);
this._db = new Nedb({
filename: table_name,
autoload,
onload(err) {
console.timeEnd(`[NEDB] Table "${table_name}" load cost time:`);
err && console.error(err);
}
});
Screenshot
Are you using any indexes? If so that is why. NeDB has to re-index every collection on load.