small-tech / jsdb

A transparent, in-memory, streaming write-on-update JavaScript database for Small Web applications that persists to a JavaScript transaction log.
Other
236 stars 8 forks source link

Benchmark #3

Closed icebob closed 3 years ago

icebob commented 3 years ago

Hi,

congratulation, it's a great project. Do you plan to make a benchmark where you compare the speed of jsdb with others (e.g nedb, lokijs, dexie...etc)?

aral commented 3 years ago

Hi @icebob,

Thank you for the kind words.

I’m not a huge fan of benchmarks as they usually don’t end up measuring real-world performance within the different use cases for different tools but I’m not averse to anyone else running them and reporting the results. I’m sure there are things we can learn from them. (I don’t see myself having the time to do this in the near future, though.)

JSDB is optimised for Small Web use, so its main characteristics are that it offers constant (and fast) reads and writes at the expense of memory use (since we don’t farm people for their data, we don’t need to store huge amounts of it).

I’ve attempted to summarise the performance characteristics and memory usage and initial load and compaction times in the readme. Do these help at all?

If this is something you’d like to help with, please, by all means keep this issue open and report back your findings.

And I hope you enjoy playing with JSDB :)

herrbasan commented 3 years ago

Benchmarks would be rather useful as from the outset I don't see JSDB being too different from nedb or lokijs. From what i've gathered the main difference is to use eval instead of parsing json. I could imagine that this brings a performance boost, but it also might not :)

I'm also a bit nervous about eval in general.

aral commented 3 years ago

The main difference between JSDB and nedb/lokijs, etc., is:

And, most importantly, it’s small tech so it wasn’t created for building surveillance-based Silicon Valley “startup” bullshit :) So it’s really not competing with tools that might have been created for that reason.

Again, not opposed to benchmarks but I don’t see myself setting aside time to create them. I’m going to close this but please feel free to re-open it or a different one if you create any benchmarks or find any that exist.