Skip to content

Conversation

@vibs29
Copy link
Contributor

@vibs29 vibs29 commented Aug 22, 2025

There is no need to sync to disk every time a record is added, because in a constant database records are only added at database creation time, and the database is created in a temp file before being moved to the final file. A sync is only needed once after all records have been added. Further force-output is not a sync because it returns before completion. finish-output is a sync (to the extent that Common Lisp offers one).

With this patch, my systems.cdb gets created in 0.6 seconds instead of 44 seconds.

There is no need to sync to disk every time a record is added, because
in a constant database records are only added at database creation time,
and the database is created in a temp file before being moved to the
final file. A sync is only needed once after all records have been
added. Further force-output is not a sync because it returns before
completion. finish-output is a sync (to the extent that Common Lisp
offers one).

With this patch, my systems.cdb gets created in 0.6 seconds instead of
44 seconds.
@quicklisp quicklisp merged commit 6d96fd8 into quicklisp:master Aug 22, 2025
@vibs29 vibs29 deleted the cdb_perf branch August 22, 2025 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants