diff --git a/client.py b/client.py index 2079f1e3..b12e44b7 100644 --- a/client.py +++ b/client.py @@ -31,6 +31,7 @@ try: argparser.add_argument( '-d', '--db_dir', help = 'set an external db location' ) argparser.add_argument( '--temp_dir', help = 'override the program\'s temporary directory' ) argparser.add_argument( '--db_journal_mode', default = 'WAL', choices = [ 'WAL', 'TRUNCATE', 'PERSIST', 'MEMORY' ], help = 'change db journal mode (default=WAL)' ) + argparser.add_argument( '--db_cache_size', type = int, help = 'override SQLite cache_size per db file, in MB (default=200)' ) argparser.add_argument( '--db_synchronous_override', type = int, choices = range(4), help = 'override SQLite Synchronous PRAGMA (default=2)' ) argparser.add_argument( '--no_db_temp_files', action='store_true', help = 'run db temp operations entirely in memory' ) argparser.add_argument( '--boot_debug', action='store_true', help = 'print additional bootup information to the log' ) @@ -88,6 +89,15 @@ try: HG.db_journal_mode = 'MEMORY' + if result.db_cache_size is not None: + + HG.db_cache_size = result.db_cache_size + + else: + + HG.db_cache_size = 200 + + if result.db_synchronous_override is not None: HG.db_synchronous = int( result.db_synchronous_override ) diff --git a/client.pyw b/client.pyw index 1f1cc31b..ffa536a3 100755 --- a/client.pyw +++ b/client.pyw @@ -31,6 +31,7 @@ try: argparser.add_argument( '-d', '--db_dir', help = 'set an external db location' ) argparser.add_argument( '--temp_dir', help = 'override the program\'s temporary directory' ) argparser.add_argument( '--db_journal_mode', default = 'WAL', choices = [ 'WAL', 'TRUNCATE', 'PERSIST', 'MEMORY' ], help = 'change db journal mode (default=WAL)' ) + argparser.add_argument( '--db_cache_size', type = int, help = 'override SQLite cache_size per db file, in MB (default=200)' ) argparser.add_argument( '--db_synchronous_override', type = int, choices = range(4), help = 'override SQLite Synchronous PRAGMA (default=2)' ) argparser.add_argument( '--no_db_temp_files', action='store_true', help = 'run db temp operations entirely in memory' ) argparser.add_argument( '--boot_debug', action='store_true', help = 'print additional bootup information to the log' ) @@ -88,6 +89,15 @@ try: HG.db_journal_mode = 'MEMORY' + if result.db_cache_size is not None: + + HG.db_cache_size = result.db_cache_size + + else: + + HG.db_cache_size = 200 + + if result.db_synchronous_override is not None: HG.db_synchronous = int( result.db_synchronous_override ) diff --git a/help/changelog.html b/help/changelog.html index 191c0556..30e825d5 100755 --- a/help/changelog.html +++ b/help/changelog.html @@ -8,6 +8,30 @@

changelog