{"id":17402981,"url":"https://github.com/thlorenz/fs-vs-sqlite","last_synced_at":"2025-03-29T20:14:03.729Z","repository":{"id":65995357,"uuid":"341322892","full_name":"thlorenz/fs-vs-sqlite","owner":"thlorenz","description":null,"archived":false,"fork":false,"pushed_at":"2021-02-23T16:20:33.000Z","size":29,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-04T20:43:34.446Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thlorenz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"thlorenz","custom":["paypal.me/thlorenz/25"]}},"created_at":"2021-02-22T20:06:32.000Z","updated_at":"2021-02-23T16:20:35.000Z","dependencies_parsed_at":"2023-04-26T11:02:21.975Z","dependency_job_id":null,"html_url":"https://github.com/thlorenz/fs-vs-sqlite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thlorenz%2Ffs-vs-sqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thlorenz%2Ffs-vs-sqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thlorenz%2Ffs-vs-sqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thlorenz%2Ffs-vs-sqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thlorenz","download_url":"https://codeload.github.com/thlorenz/fs-vs-sqlite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246237436,"owners_count":20745348,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-16T18:43:45.220Z","updated_at":"2025-03-29T20:14:03.686Z","avatar_url":"https://github.com/thlorenz.png","language":"JavaScript","readme":"# fs-vs-sqlite\n\n## 50 files\n\n```\nread:sync:    1.886ms\nread:async:   3.086ms\n\ndb:async:     0.899ms\ndb:sync:      0.600ms\n\ndb:async.get: 4.467ms\ndb:sync.get:  2.165ms\n\nRead 50 files, total chars 152,066\n```\n\n- `db:async` takes **50%** of the time `read:sync` does and **30%** of the time that\n  `read:async` does\n- `db:(s)sync.get` which retrieves content one by one instead of via `SELECT * FROM ...`\n  performs a lot worse since it actually has to query by `file`\n- NOTE: the `file` is indexed\n\n## 500 files\n\n```\nread:sync:     17.028ms\nread:async:    16.287ms\n\ndb:sync:       3.327ms\ndb:async:      4.827ms\n\ndb:sync.get:  19.538ms\ndb:async.get: 35.814ms\n\nRead 500 files, total chars 1,520,660\n```\n\n- `db:async` takes **30%** of the time `read:async` does\n\n## 5,000 files\n\n```\nread:sync:     154.228ms\nread:async:    134.503ms\n\ndb:sync:       37.708ms\ndb:async:      35.759ms\n\ndb:sync.get:  179.368ms\ndb:async.get: 304.823ms\n\nRead 5,000 files, total chars 15,206,600\n```\n \n- `db:async` takes **27%** of the time `read:async` does\n\n## 10,000 files\n\n```\nread:sync:     285.747ms\nread:async:    249.342ms\n\ndb:sync:        70.344ms\ndb:async:       80.419ms\n\ndb:sync.get:   309.252ms\ndb:async.get:  566.872ms\n\nRead 10000 files, total chars 30,413,200\n```\n \n- `db:async` takes **32%** of the time `read:async` does\n","funding_links":["https://github.com/sponsors/thlorenz","paypal.me/thlorenz/25"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthlorenz%2Ffs-vs-sqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthlorenz%2Ffs-vs-sqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthlorenz%2Ffs-vs-sqlite/lists"}