Files
purple-electrumwallet/electrum
Malcolm Smith 67ae678137 storage/db: use faster JSON encoder settings when wallet is encrypted
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>
2021-01-06 21:14:56 +01:00
..
2020-06-23 19:25:07 +02:00
2020-08-20 18:58:52 +02:00
2020-12-08 12:21:56 +01:00
2020-06-05 13:17:01 +02:00
2021-01-04 12:39:24 +01:00
2020-11-20 08:51:01 +01:00
2020-10-23 02:17:31 +00:00
2020-12-09 16:09:12 +01:00
2020-12-18 19:40:39 +01:00