Skip to content

Conversation

neznaika0
Copy link
Contributor

@neznaika0 neznaika0 commented Sep 10, 2025

Description
On some systems, there may be a huge drop when reading/writing even to SSD. I think data loss is not critical for tests, you can disable it.
The framework already knows how to work with the option, it's worth leaving at least NORMAL (1) in production.
See see https://www.sqlite.org/pragma.html#pragma_synchronous

UPD:

// Before PHP 8.4
Time: 00:34.360, Memory: 80.50 MB
// Before PHP 8.3
Time: 00:25.448, Memory: 78.50 MB

// After PHP 8.4
Time: 00:07.573, Memory: 80.50 MB
// After PHP 8.3
Time: 00:07.320, Memory: 78.50 MB

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@michalsn
Copy link
Member

Please move this to app/Config/Database::tests, under the busyTimeout option.
It's better to declare this explicitly, since that way it can be easily overridden via the .env file.

Also, please set it to null so we can rely on the default value provided by SQLite3. If you need to change it later, you'll have an easy way to do so.

Copy link
Member

@michalsn michalsn left a comment

Choose a reason for hiding this comment

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

Thank you!

@neznaika0 neznaika0 force-pushed the refactor/sqlite-registrar branch from b68c37a to e00d38c Compare September 10, 2025 18:46
@paulbalandan paulbalandan merged commit 05495dd into codeigniter4:develop Sep 13, 2025
98 checks passed
@paulbalandan
Copy link
Member

Thank you, @neznaika0

@neznaika0 neznaika0 deleted the refactor/sqlite-registrar branch September 13, 2025 14:26
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.

3 participants