Comments (2)
I did some profiling by tweaking the JSON output format. With a very large wallet (>100 MB), there are some potential gains by writing compact unsorted JSON:
diff --git a/electroncash/storage.py b/electroncash/storage.py
index fd872d1d1..08e685c00 100644
--- a/electroncash/storage.py
+++ b/electroncash/storage.py
@@ -120,8 +120,10 @@ class JsonDB(PrintError):
return
s = json.dumps(
self.data,
- indent=4 if self.output_pretty_json else None,
- sort_keys=self.output_pretty_json,
+ indent=None,
+ sort_keys=False,
cls=util.MyEncoder
)
s = self.encrypt_before_writing(s)
sort,indent
| 15.489| |03| [profiler] WalletStorage.write 0.9943
no sort, indent
| 16.008| |03| [profiler] WalletStorage.write 0.8581
no sort, no indent
| 15.378| |05| [profiler] WalletStorage.write 0.4795
from electrumabc.
Related discussion: spesmilo#4823
from electrumabc.
Related Issues (20)
- AttributeError: 'DeviceMgr' object has no attribute 'recognised_hardware'
- Cashfusion: SSL certificate expired HOT 1
- protobuf generated file outdated HOT 1
- improvements to invoice
- fusion_status command only works while in the same terminal session as daemon start as
- AssertionError HOT 4
- Zero balanced transactions HOT 3
- copying amount from history tab and pasting in send tab does not work
- AttributeError: 'ImportedAddressWallet' object has no attribute 'receiving_addresses'
- OSError: [Errno 22] Invalid argument: 'c:\\users\\kris636\\appdata\\roaming\\electrumabc\\wallets\\baby636#86037.8835595521🔑\n.tmp.1892' HOT 2
- [lint] move same line comments to previous line
- [lint] fix flake8 warnings and don't ignore them HOT 2
- [CLI] investigate potential multi-threading issues
- support building 64-bit Windows binaries
- Malicious/Trojan reports increased
- CashFusion server fusion.tokamak.cash:8788 SSL/TLS cert expired HOT 1
- ValueError: too many values to unpack (expected 2) HOT 1
- Data error invalid coin name
- AssertionError HOT 1
- CashFusion server fusion.tokamak.cash:8788 SSL/TLS cert expired HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electrumabc.