Fix for shared-memory path for SQLite file #11
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Apparently, we missed a slash character from the SQLite file's path.
Current path: sqlite://localhost/dev/shm/test.sqlite
Proposed path: sqlite://localhost//dev/shm/test.sqlite
@see https://git.drupalcode.org/project/drupal/-/blob/9.2.x/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php#L473
@see https://git.drupalcode.org/project/drupal/-/blob/9.2.x/core/tests/Drupal/Tests/Core/Database/Driver/sqlite/ConnectionTest.php#L44
I stumbled up on the above links while trying to troubleshoot localgov_subsites' test failures although this change won't help the localgov_subsites one.
This proposed change has brought down the test run time to under 16 minutes from the previous 25+ minutes. So not bad. I am still praying for a sub 10 minute run :)
Another option is to try
sqlite://localhost/:memory:
leading SQLite to create a temporary database directly in the memory. This completely avoids the Operating system's disk API putting SQLite in more direct control. This is supposed to improve SQLite's performance even further although I haven't noticed any difference in my local development site. That's why I am sticking with a file system based URL.