Skip to content

Commit

Permalink
Merge branch 'large-backup-performance'
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyates committed Jul 8, 2023
2 parents d1540ba + 2010d29 commit 8843852
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2023-06-30 17:40:25 UTC using RuboCop version 1.51.0.
# on 2023-07-08 06:54:16 UTC using RuboCop version 1.51.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand All @@ -20,7 +20,7 @@ Metrics/BlockLength:
# Offense count: 9
# Configuration parameters: CountComments, CountAsOne.
Metrics/ClassLength:
Max: 175
Max: 180

# Offense count: 5
# Configuration parameters: AllowedMethods, AllowedPatterns.
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 9.3.2 - 2023-06-04

## Changed

* Improved performance of large backups by avoiding unnecessary serialized
IMAP data migration and validation checks.

## 9.3.1 - 2023-05-12

## Changed
Expand Down
8 changes: 7 additions & 1 deletion lib/imap/backup/serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,20 @@ class FolderIntegrityError < StandardError; end
def initialize(path, folder)
@path = path
@folder = folder
@validated = nil
end

# Returns true if there are existing, valid files
# false otherwise (in which case any existing files are deleted)
def validate!
return if @validated

optionally_migrate2to3

return true if imap.valid? && mbox.valid?
if imap.valid? && mbox.valid?
@validated = true
return true
end

delete

Expand Down
2 changes: 1 addition & 1 deletion lib/imap/backup/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Imap; end
module Imap::Backup
MAJOR = 9
MINOR = 3
REVISION = 1
REVISION = 2
PRE = nil
VERSION = [MAJOR, MINOR, REVISION, PRE].compact.map(&:to_s).join(".")
end

0 comments on commit 8843852

Please sign in to comment.