Closed vweevers closed 1 year ago
I did a quick test on memory-level
, replacing _put(key, value, options, callback)
with async _put(key, value, options)
. As a result, await db.put(key, value)
is 2x faster!
$ level-bench plot put
benchmark put on memory-level@1.0.0 win32 x64
node@16.9.1 n=1M concurrency=4 valueSize=100B keys=random values=random
1 memory-level#v2 69565 ops/s ±8.83% fastest
2 memory-level#main 33750 ops/s ±8.07% +51.14%
Removed a bunch of items from the list above, to keep the release manageable (see v2/UPGRADING.md
for current content).
Done; remaining items can go into a future release.
In order of significance:
process.nextTick()
withqueueMicrotask()
Remove(postponed)batch
,put
anddel
eventsSupport hooks and events on(postponed)db.clear()
. I don't know how yet, but may require breaking changes.Remove(postponed)_checkKey()
and_checkValue()
, anabstract-leveldown
leftover that has questionable value because after these methods are called, we run keys and values through encodings. Inlevel-transcoder
we should throw if the json encoding returnsundefined
, as a replacement forundefined
checks. Other encodings don't need such checks.Throw error in default private API methods that must be overridden.(postponed; can be semver-minor)These won't necessarily land in a single major version. I wanted a place to list them and allow people to object.