Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Source code alone, package size is 1.8 MB, 8.5 MB unpacked. With prebuilds, the package size is 5.9 MB, 19.5 MB unpacked. (side note: I |
|
Benchmark code available here. With some npm magic you can install Repeat the last 3 steps for the other benchmarks ( Last note: you don't have to npm-install Results on Windows (TLDR: we're good, though we don't have read benchmarks yet): |
|
More benchmarks are welcome, post results here! In the mean time I'm merging this. |





Closes #100. Though this looks like a big PR, there's not much code to review because I copied large parts from
leveldown. That includesbinding.ccand all JS files including tests (rocksdbhas only one test of its own:open-read-only-test.js). The differences betweenleveldownandrocksdbare recorded in 3433541, 7a5547b and bcdd317.Prebuilds
Like
leveldown,rocksdbnow usesprebuildifywhich means prebuilds will be included in the npm package. Unlikeleveldown,rocksdbdoes not make prebuilds for ARM, Android or Alpine (until someone requests them, I figured) (and on RPi and mobile you're better off with RocksDBLite). After initial review of this PR I'll trigger CI to make prebuilds, so we can check what the total npm package size will be.Additional changes
cacheSizeis0, rather than using a block cache with RocksDB's default sizeverify_checksumsto false (same asleveldown/ LevelDB) (Support checksum options leveldown#172 (comment))leveldown/ LevelDB)info_log_levelfromINFO_LEVELtoWARN_LEVELPerformance
The leak tests (
node --expose-gc test/leak-tester[-batch]) show memory growth but I get the same results onmaster(I used node 10.14.1 on both) so it might be a preexisting leak or natural RocksDB growth.I want to run benchmarks as well; perhaps by extracting the benchmarks from
leveldowninto a standalone tool that can target anyabstract-leveldownimplementation.