I've been trying to use LevelGraph with MemDOWN, but my put and get queries are getting 100 times slower compared with using the filesystem directly with LevelUP. Obviously, I must be doing something wrong. I setup my graph database in the following fashion:
var levelgraph = require('levelgraph');
var db = levelgraph('mydb', { db: require('memdown')});
The following works just fine, but is using the filesystem:
var levelgraph = require('levelgraph');
var db = levelgraph('mydb');
Any suggestions?
This is due to the fact that MemDOWN is really simple (144 lines of code), and does not have any of the optimizations offered by other implementations of LevelDOWN. Kudos to mcollina for the answer. It is possible that level-cache could provide a faster implemtation (investigating).