coleifer/huey — pull request #53 by jbaiter (2014-03-03 18:09:58+00:00)
Title: SQLite backend performance optimizations

This adds some `PRAGMA` statements to increase performance:

[`journal_mode=WAL`](https://www.sqlite.org/pragma.html#pragma_journal_mode)
Enables write-ahead logging

[`synchronous=OFF`](https://www.sqlite.org/pragma.html#pragma_synchronous)
Leaves it to the OS when to sync data to disk

[`temp_store=MEMORY`](https://www.sqlite.org/pragma.html#pragma_temp_store)
Writes temporary tables and indices to an in-memory database instead of the disk

On my benchmarks, the backend now performs 210x faster when writing/reading 1000tasks.
As a consequence, however, sudden power-offs/system might corrupt the database, application crashes should not cause any problems, though.