From 5a0d80e685a0172500bf17dbb1e0c27037e58b0b Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 24 Jan 2018 15:03:45 +0100 Subject: Only increase sqlite cache size during update While not all operations fill the cache, --list does. However, for read operations it doesn't actually appear to help performance. Limit the large cache setting to update operations only because there it does really increase performance. Signed-off-by: Florian Pritz --- lib/App/BorgRestore.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/App/BorgRestore.pm') diff --git a/lib/App/BorgRestore.pm b/lib/App/BorgRestore.pm index c3b37fd..964ea48 100644 --- a/lib/App/BorgRestore.pm +++ b/lib/App/BorgRestore.pm @@ -532,6 +532,8 @@ method update_cache() { my $borg_archives = $self->{borg}->borg_list(); + # write operations benefit from the large cache so set the cache size here + $self->{db}->set_cache_size(); $self->_handle_removed_archives($borg_archives); $self->_handle_added_archives($borg_archives); -- cgit v1.2.3-24-g4f1b