You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bus app currently uses lowDB to write JSON file-based logs to disk. The way lowDB works requires it to hold the entire log in memory and then overwrite the entire log file with each hit. The current db.json file is 62MB and about 2.7 million lines! That's a lot of overhead for each hit and since there are two log files the app write both with each hit.
The bus app currently uses lowDB to write JSON file-based logs to disk. The way lowDB works requires it to hold the entire log in memory and then overwrite the entire log file with each hit. The current db.json file is 62MB and about 2.7 million lines! That's a lot of overhead for each hit and since there are two log files the app write both with each hit.
I propose moving to something like neB https://github.com/louischatriot/nedb (or similar if anyone has another idea).
The main advantages neBD has are:
The interface is about as simple as lowDB. It still hold the db in memory, which is less than ideal, but manageable if we can automate log rollovers.
It also has indexing which might speed up the /logPlot which is currently slow (and I think it also blocks).
The text was updated successfully, but these errors were encountered: