Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(startup): use WAL journal for sqlite databases in DENO_DIR #23955

Merged
merged 1 commit into from
May 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/cache/cache_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl CacheDBConfiguration {
fn create_combined_sql(&self) -> String {
format!(
"
PRAGMA journal_mode=TRUNCATE;
PRAGMA journal_mode=WAL;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems we previously disabled this for performance reasons? #18084

I wonder what impact this will have on non-gcp machines (not sure why that machine is so slow because neither my winows, mac, or linux machine have this issue)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, just realized that was done only for startup perf reasons, but we initialize the sqlite caches on blocking threads now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that was in #18401, and we benchmarked almost all of them within a 10th of a ms.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just benchmarked WAL and it is much faster on my mac. 176ms down to 142ms.

PRAGMA synchronous=NORMAL;
PRAGMA temp_store=memory;
PRAGMA page_size=4096;
Expand Down