Source: sqlcipher
Version: 3.2.0-2
Severity: normal

SQLCipher inherits from SQLite a compile time option called HAVE_USLEEP
that enables the use of the usleep() system call. If it is not set,
sqlite3_sleep() will have a minimum wait interval of 1 second,
regardless of its argument (see: https://sqlite.org/compile.html).

In the case of concurrent access to a database, the internal sqlcipher
retry strategy is affected. Instead of sleeping for something between 1
and 100 milliseconds, sqlcipher will always sleep for one whole second
before trying to gain write access again. This is a waste of resources
as threads might be sleeping much more than needed, and also affects
applications in which the configured timeout is less than one second.
Also, retry strategies implemented on top of sqlcipher are more
difficult to succeed and be tuned.

To fix this, the HAVE_USLEEP compile time option has to be enabled for
the platforms that support it.

Reply via email to