Fossil SCM

*** TEST only, not to be committed to trunk *** Reads sqlite cache pragma setting from env var. See forum posting by Dan Shearer "Fossil cache speedups"

danshearer 2026-08-21 20:37 UTC cache-speedups
Commit bce3a5a5d4ac2f4bb50c6478a2abf096a97d4ffbab41f08395416978b1dca125
1 file changed +7
+7
--- src/db.c
+++ src/db.c
@@ -2761,10 +2761,17 @@
27612761
}
27622762
}
27632763
g.zRepositoryName = fossil_strdup(zDbName);
27642764
db_open_or_attach(g.zRepositoryName, "repository");
27652765
g.repositoryOpen = 1;
2766
+ {
2767
+ /* TESTING FIXME set SQL cache size from environment FIXME */
2768
+ const char *zCS = getenv("FOSSIL_SQLCACHE");
2769
+ if( zCS!=0 && atoi(zCS)!=0 ){
2770
+ db_multi_exec("PRAGMA repository.cache_size=%d;", atoi(zCS));
2771
+ }
2772
+ }
27662773
sqlite3_file_control(g.db, "repository", SQLITE_FCNTL_DATA_VERSION,
27672774
&g.iRepoDataVers);
27682775
27692776
/* Cache "allow-symlinks" option, because we'll need it on every stat call */
27702777
g.allowSymlinks = db_get_boolean("allow-symlinks",0);
27712778
--- src/db.c
+++ src/db.c
@@ -2761,10 +2761,17 @@
2761 }
2762 }
2763 g.zRepositoryName = fossil_strdup(zDbName);
2764 db_open_or_attach(g.zRepositoryName, "repository");
2765 g.repositoryOpen = 1;
 
 
 
 
 
 
 
2766 sqlite3_file_control(g.db, "repository", SQLITE_FCNTL_DATA_VERSION,
2767 &g.iRepoDataVers);
2768
2769 /* Cache "allow-symlinks" option, because we'll need it on every stat call */
2770 g.allowSymlinks = db_get_boolean("allow-symlinks",0);
2771
--- src/db.c
+++ src/db.c
@@ -2761,10 +2761,17 @@
2761 }
2762 }
2763 g.zRepositoryName = fossil_strdup(zDbName);
2764 db_open_or_attach(g.zRepositoryName, "repository");
2765 g.repositoryOpen = 1;
2766 {
2767 /* TESTING FIXME set SQL cache size from environment FIXME */
2768 const char *zCS = getenv("FOSSIL_SQLCACHE");
2769 if( zCS!=0 && atoi(zCS)!=0 ){
2770 db_multi_exec("PRAGMA repository.cache_size=%d;", atoi(zCS));
2771 }
2772 }
2773 sqlite3_file_control(g.db, "repository", SQLITE_FCNTL_DATA_VERSION,
2774 &g.iRepoDataVers);
2775
2776 /* Cache "allow-symlinks" option, because we'll need it on every stat call */
2777 g.allowSymlinks = db_get_boolean("allow-symlinks",0);
2778

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button