subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject svn commit: r1659426 - /subversion/trunk/subversion/libsvn_subr/sqlite.c
Date Thu, 12 Feb 2015 22:42:35 GMT
Author: ivan
Date: Thu Feb 12 22:42:35 2015
New Revision: 1659426

URL: http://svn.apache.org/r1659426
Log:
Use journal_mode = TRUNCATE for sqlite [1] instead of default DELETE value. 
It makes svn checkout about 10% faster on Windows at expense of one empty 
file in .svn. Create/delete file is relatively expensive operation on 
Windows, especially if indexes/virus scanners are enabled.

The TRUNCATE and DELETE journal modes are compatible, so different
Subversion clients with different journal mode should just work with same 
working copy without problems.

[1] http://www.sqlite.org/pragma.html#pragma_journal_mode

* subversion/libsvn_subr/sqlite.c
  (svn_sqlite__open): Execute PRAGMA journal_mode = TRUNCATE when opening 
   sqlite database.

Modified:
    subversion/trunk/subversion/libsvn_subr/sqlite.c

Modified: subversion/trunk/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/sqlite.c?rev=1659426&r1=1659425&r2=1659426&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/trunk/subversion/libsvn_subr/sqlite.c Thu Feb 12 22:42:35 2015
@@ -1171,7 +1171,8 @@ svn_sqlite__open(svn_sqlite__db_t **db,
                  affects application(read: Subversion) performance/behavior. */
               "PRAGMA foreign_keys=OFF;"      /* SQLITE_DEFAULT_FOREIGN_KEYS*/
               "PRAGMA locking_mode = NORMAL;" /* SQLITE_DEFAULT_LOCKING_MODE */
-                            ),
+              "PRAGMA journal_mode = TRUNCATE;"
+              ),
                 *db);
 
 #if defined(SVN_DEBUG)



Mime
View raw message