Other: Use msgpack instead of json in vault

msgpack is much faster at serializing and deserializing than json. Using
it in the vault gives a performance boost.
This commit is contained in:
James Houlahan
2022-10-20 16:36:53 +02:00
parent c7a5b8559c
commit d376b88cf0
7 changed files with 75 additions and 10 deletions

View File

@ -20,7 +20,6 @@ package vault
import (
"math/rand"
"github.com/Masterminds/semver/v3"
"github.com/ProtonMail/gluon/imap"
"github.com/ProtonMail/proton-bridge/v2/internal/updater"
)
@ -58,7 +57,7 @@ type Settings struct {
Autostart bool
AutoUpdate bool
LastVersion *semver.Version
LastVersion string
FirstStart bool
FirstStartGUI bool
}
@ -81,7 +80,7 @@ func newDefaultSettings(gluonDir string) Settings {
Autostart: false,
AutoUpdate: true,
LastVersion: semver.MustParse("0.0.0"),
LastVersion: "0.0.0",
FirstStart: true,
FirstStartGUI: true,
}