4 ms·
My hypothesis is that the scenarios the SQLite team has setup don’t particularly exploit the fact that the SQLite metrics become more favorable the more files a
by manmal 2y ago
My hypothesis is that the scenarios the SQLite team has setup don’t particularly exploit the fact that the SQLite metrics become more favorable the more files are accessed.
- ori_b 2y agoI took a look at the code, and the file based code is basically the worst case for the file system, accessing about as many files as it can. Additionally, it's doing a lot of unnecessary work. It's using buffered I/O to do a full file read, and throwing away the buffer immediately, which is an expensive way to add an unnecessary memcpy. It's opening by full path instead of openat, which incurs a path lookup penalty. I think the file based code can be quite a bit faster, if you put a bit of effort in. I think in serious use, the gap would narrow, not grow.