67ae678137
The standard json module has an optimized C encoder, but that doesn't currently support indentation. So if you request indentation, it falls back on the slower Python encoder. Readability doesn't matter for encrypted wallets, so this disables indentation when the wallet is encrypted. ----- based on https://github.com/Electron-Cash/Electron-Cash/commit/b2399b6a3e3e39ddd82ffc432bb1ca07f2aab454 For a large encrypted wallet, compare: before change: JsonDB.dump 1.3153 sec zlib.compress 1.281 sec ECPubkey.encrypt_message 0.1744 sec after change: JsonDB.dump 0.5059 sec zlib.compress 1.3120 sec ECPubkey.encrypt_message 0.1630 sec Co-authored-by: SomberNight <somber.night@protonmail.com>