0
Commit Graph

6 Commits

Author SHA1 Message Date
Caitlin Fischer
598a10e937 Clean up SqlSkipPreload feature.
Bug: 1126640
Change-Id: I87de57b6c22c6b2f7bda8c6ca6a8b501436f863b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2435327
Reviewed-by: Victor Costan <pwnall@chromium.org>
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Commit-Queue: Caitlin Fischer <caitlinfischer@google.com>
Cr-Commit-Position: refs/heads/master@{#812006}
2020-09-30 14:28:25 +00:00
Shubham Aggarwal
be4f97ce11 SQLite: Add support for WAL mode
As per issue 78507, we are looking to add support for SQLite databases
to use Write-ahead logging (https://www.sqlite.org/wal.html) mode in
Chromium. WAL mode should give us significant performance gains across
almost all use-cases.

This change is a first step towards achieving this. It adds opt-in
support to enable WAL mode for a database connection and perform a
checkpoint. It also adds a feature flag to enable WAL mode for all
databases by default to investigate its feasibility and impact on
performance.

Bug: 78507
Change-Id: I7fc5edcc39b50d2a13755d587cf342bded1af60a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2095927
Commit-Queue: Shubham Aggarwal <shuagga@microsoft.com>
Reviewed-by: Brandon Maslen <brandm@microsoft.com>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Reviewed-by: Chris Mumford <cmumford@google.com>
Cr-Commit-Position: refs/heads/master@{#780318}
2020-06-19 15:58:57 +00:00
Victor Costan
3ffd9a3731 sql: Add Finch trial for eliminating sql::Database::Preload().
The logic in sql::Database::Preload() is a pessimization for modern OS
schedulers, as it forces the kernel to read the first few pages of a
newly opened database. https://crbug.com/243949 suggests that this
method was added without performance testing, just like the more complex
SQLite patch that it replaces.

This CL sets up a Finch trial that will either prove that we can get rid
of the Preload() hack, or give us conclusive data about its usefulness.

Bug: 243949
Change-Id: Icfee9aaa3d125af207974536e8e5f5e64a9609ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1438031
Reviewed-by: Steven Holte <holte@chromium.org>
Reviewed-by: Chris Mumford <cmumford@google.com>
Commit-Queue: Steven Holte <holte@chromium.org>
Auto-Submit: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662006}
2019-05-22 00:46:54 +00:00
Victor Costan
249be7083d sql: Remove SqlTempStoreMemory experiment.
All the necessary data has been collected. This CL undoes the parts of
https://crrev.com/c/1180530 and https://crrev.com/c/1183786 that were
not general code health improvements.

Bug: 875538
Change-Id: Ibd604c69996072db71c47b18b99f79962f389c3f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1612266
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: Chris Mumford <cmumford@google.com>
Reviewed-by: Steven Holte <holte@chromium.org>
Commit-Queue: Steven Holte <holte@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660615}
2019-05-16 22:24:10 +00:00
Victor Costan
e56cc68b9c sql: Switch from custom macro to COMPONENT_EXPORT.
TBR: jsbell
Change-Id: I5b998afa31810577e0bfd9d4d29ef9d462bce5b7
Reviewed-on: https://chromium-review.googlesource.com/c/1390332
Reviewed-by: Victor Costan <pwnall@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618989}
2018-12-27 01:53:46 +00:00
Victor Costan
4c2f3e9227 sql: Feature flag for in-memory temporary storage.
This CL introduces SqlTempStoreMemory flag, which is intended to be
managed via Finch. When set, the flag causes sql::Database to run a
PRAGMA temp_store=MEMORY [1] query on every opened database.

This approach is intended to approximate the effect of building SQLite
with the SQLITE_TEMP_STORE=3 [2] macro, to measure the memory
consumption impact. Ideally, we'd test the macro directly, but //sql is
a core component of Chrome, so we can't load different versions of it
based on Finch.

[1] https://www.sqlite.org/pragma.html#pragma_temp_store
[2] https://www.sqlite.org/compile.html#temp_store

Bug: 875538
Change-Id: I537d90d763be1100503ed4bd2ada2ee19eb090bb
Reviewed-on: https://chromium-review.googlesource.com/1180530
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Reviewed-by: Chris Mumford <cmumford@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584652}
2018-08-21 04:47:59 +00:00