Optimize _clear()
vweevers opened this issue · 0 comments
vweevers commented
The clear()
method currently uses a JS-land iterator, which is inefficient. We can instead iterate and delete in C++. Rough plan to get there:
- Refactor this to avoid a repeated
delete start
, by doing the logic in reverse, and remove the need for this by using anstd::string
forstart
- Reuse that code to create an iterator
-
Maybe merge the code that does initial seek with code that does manual seek - Write
ClearWorker
- Write
NAPI_METHOD(db_clear)