You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ko...@apache.org on 2019/08/20 09:23:55 UTC
svn commit: r1865523 -
/subversion/trunk/subversion/libsvn_subr/sqlite3wrapper.c
Author: kotkov
Date: Tue Aug 20 09:23:55 2019
New Revision: 1865523
URL: http://svn.apache.org/viewvc?rev=1865523&view=rev
Log:
When compiling SQLite, enable the SQLITE_OMIT_WAL compile-time option.
We don't use WAL (write-ahead logging) feature of SQLite, but just keeping it
enabled has a visible I/O performance penalty, because SQLite has to check if
the write-ahead log file is present on disk. In a couple of my experiments,
disabling this feature resulted in a ~10% faster `svn st` on a large working
copy.
* subversion/libsvn_subr/sqlite3wrapper.c
(): Define SQLITE_OMIT_WAL.
Modified:
subversion/trunk/subversion/libsvn_subr/sqlite3wrapper.c
Modified: subversion/trunk/subversion/libsvn_subr/sqlite3wrapper.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/sqlite3wrapper.c?rev=1865523&r1=1865522&r2=1865523&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/sqlite3wrapper.c (original)
+++ subversion/trunk/subversion/libsvn_subr/sqlite3wrapper.c Tue Aug 20 09:23:55 2019
@@ -26,6 +26,7 @@
#ifdef SVN_SQLITE_INLINE
# define SQLITE_OMIT_DEPRECATED 1
# define SQLITE_DEFAULT_MEMSTATUS 0
+# define SQLITE_OMIT_WAL 1
# define SQLITE_API static
# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
# pragma GCC diagnostic ignored "-Wunreachable-code"
Re: svn commit: r1865523 - /subversion/trunk/subversion/libsvn_subr/sqlite3wrapper.c
Posted by Evgeny Kotkov <ev...@visualsvn.com>.
Daniel Shahaf <d....@daniel.shahaf.name> writes:
> Quoting https://sqlite.org/compile.html#_options_to_omit_features:
>
> Important Note: The SQLITE_OMIT_* options may not work with
> the amalgamation. SQLITE_OMIT_* compile-time options usually
> work correctly only when SQLite is built from canonical
> source files.
>
> and a bit later:
>
> Also, not all SQLITE_OMIT_* options are tested. Some
> SQLITE_OMIT_* options might cause SQLite to malfunction and/or
> provide incorrect answers.
>
> I think we should:
>
> - Revert r1865523
I see that this option has been supported from its introduction in 2010, and
that it appears to be covered in tests. Also, since it only affects the
journaling mode, apparently it does not participate in the parser/keyword
generation, which is listed as the reason of not using it with amalgamation:
https://github.com/sqlite/sqlite/blob/cc3f3d1f055/src/parse.y
https://github.com/sqlite/sqlite/blob/cc3f3d1f055/tool/mkkeywordhash.c
https://github.com/sqlite/sqlite/blob/cc3f3d1f055/test/attach4.test#L82
https://github.com/sqlite/sqlite/commit/bc6b8d73592ad72e674b10152012170a01c31c62
Thanks,
Evgeny Kotkov
Re: svn commit: r1865523 - /subversion/trunk/subversion/libsvn_subr/sqlite3wrapper.c
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
kotkov@apache.org wrote on Tue, 20 Aug 2019 09:23 +00:00:
> +++ subversion/trunk/subversion/libsvn_subr/sqlite3wrapper.c Tue Aug 20 09:23:55 2019
> @@ -26,6 +26,7 @@
> #ifdef SVN_SQLITE_INLINE
> # define SQLITE_OMIT_DEPRECATED 1
> # define SQLITE_DEFAULT_MEMSTATUS 0
> +# define SQLITE_OMIT_WAL 1
Quoting https://sqlite.org/compile.html#_options_to_omit_features:
Important Note: The SQLITE_OMIT_* options may not work with
the amalgamation. SQLITE_OMIT_* compile-time options usually
work correctly only when SQLite is built from canonical
source files.
and a bit later:
Also, not all SQLITE_OMIT_* options are tested. Some
SQLITE_OMIT_* options might cause SQLite to malfunction and/or
provide incorrect answers.
I think we should:
- Revert r1865523
(feel free to add it to INSTALL, notes/knobs, etc; but off by default, please)
- Stop defining SQLITE_OMIT_DEPRECATED
- Backport the latter change to stable branches.
To the latter two bullet points: I'm aware that
https://sqlite.org/compile.html#recommended_compile_time_options
recommends SQLITE_OMIT_DEPRECATED, but
https://sqlite.org/compile.html#_options_to_omit_features says using
that macro may break correctness (!), and I'm voting to err on the side
of caution.
Thanks for linking the upstream documentation in the log message!
Cheers,
Daniel
> # define SQLITE_API static
> # if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
> # pragma GCC diagnostic ignored "-Wunreachable-code"
>
>
>
Re: svn commit: r1865523 - /subversion/trunk/subversion/libsvn_subr/sqlite3wrapper.c
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
kotkov@apache.org wrote on Tue, 20 Aug 2019 09:23 +00:00:
> +++ subversion/trunk/subversion/libsvn_subr/sqlite3wrapper.c Tue Aug 20 09:23:55 2019
> @@ -26,6 +26,7 @@
> #ifdef SVN_SQLITE_INLINE
> # define SQLITE_OMIT_DEPRECATED 1
> # define SQLITE_DEFAULT_MEMSTATUS 0
> +# define SQLITE_OMIT_WAL 1
Quoting https://sqlite.org/compile.html#_options_to_omit_features:
Important Note: The SQLITE_OMIT_* options may not work with
the amalgamation. SQLITE_OMIT_* compile-time options usually
work correctly only when SQLite is built from canonical
source files.
and a bit later:
Also, not all SQLITE_OMIT_* options are tested. Some
SQLITE_OMIT_* options might cause SQLite to malfunction and/or
provide incorrect answers.
I think we should:
- Revert r1865523
(feel free to add it to INSTALL, notes/knobs, etc; but off by default, please)
- Stop defining SQLITE_OMIT_DEPRECATED
- Backport the latter change to stable branches.
To the latter two bullet points: I'm aware that
https://sqlite.org/compile.html#recommended_compile_time_options
recommends SQLITE_OMIT_DEPRECATED, but
https://sqlite.org/compile.html#_options_to_omit_features says using
that macro may break correctness (!), and I'm voting to err on the side
of caution.
Thanks for linking the upstream documentation in the log message!
Cheers,
Daniel
> # define SQLITE_API static
> # if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
> # pragma GCC diagnostic ignored "-Wunreachable-code"
>
>
>