Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thlorenz/fs-vs-sqlite
https://github.com/thlorenz/fs-vs-sqlite
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/thlorenz/fs-vs-sqlite
- Owner: thlorenz
- Created: 2021-02-22T20:06:32.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-23T16:20:33.000Z (almost 4 years ago)
- Last Synced: 2024-10-23T06:15:13.817Z (2 months ago)
- Language: JavaScript
- Size: 28.3 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fs-vs-sqlite
## 50 files
```
read:sync: 1.886ms
read:async: 3.086msdb:async: 0.899ms
db:sync: 0.600msdb:async.get: 4.467ms
db:sync.get: 2.165msRead 50 files, total chars 152,066
```- `db:async` takes **50%** of the time `read:sync` does and **30%** of the time that
`read:async` does
- `db:(s)sync.get` which retrieves content one by one instead of via `SELECT * FROM ...`
performs a lot worse since it actually has to query by `file`
- NOTE: the `file` is indexed## 500 files
```
read:sync: 17.028ms
read:async: 16.287msdb:sync: 3.327ms
db:async: 4.827msdb:sync.get: 19.538ms
db:async.get: 35.814msRead 500 files, total chars 1,520,660
```- `db:async` takes **30%** of the time `read:async` does
## 5,000 files
```
read:sync: 154.228ms
read:async: 134.503msdb:sync: 37.708ms
db:async: 35.759msdb:sync.get: 179.368ms
db:async.get: 304.823msRead 5,000 files, total chars 15,206,600
```
- `db:async` takes **27%** of the time `read:async` does## 10,000 files
```
read:sync: 285.747ms
read:async: 249.342msdb:sync: 70.344ms
db:async: 80.419msdb:sync.get: 309.252ms
db:async.get: 566.872msRead 10000 files, total chars 30,413,200
```
- `db:async` takes **32%** of the time `read:async` does