Comment by sedatk
2 years ago
Because SQLite not being an FS is apparently the reason why it’s fast:
> The performance difference arises (we believe) because when working from an SQLite database, the open() and close() system calls are invoked only once, whereas open() and close() are invoked once for each blob when using blobs stored in individual files.
Additionally, it may also be that accesses to a single file allows the OS to efficiently retrieve (and IIRC in the case of Windows, predict) the working set allowing the reduction of access times; which is not the case if you open multiple files.
Not so much working set, as you only have to check the access control once. Windows does a lot of stuff when you open a file, and creating a process is even worse.