-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JoinMarket becomes slow with old wallets with a lots of tx history #1349
Comments
Yes, but also note that it's significantly slower if fidelity bonds are enabled. (In fact before they got merged into a release, they were even maybe 5-10 times slower; it's a function of how many time intervals you scan). I would generally caution users to shift to a new wallet after the wallet indices reach the several hundreds in each branch, or perhaps every 6 months or so, depending on circumstances. As for making it faster, I'm not sure. There have been several initiatives to make both syncing and monitoring as fast as is reasonable over the years, but for sure always more can be done. |
From a quick profiling, it seems most of the runtime comes from low level The wallet used is a Signet one with around 100 txs (CJ and non) done over its lifetime. The graph are made using https://github.com/jrfonseca/gprof2dot and cProfile: python -m cProfile -o output.pstats path/to/your/script arg1 arg2
gprof2dot.py -f pstats output.pstats | dot -Tpng -o output.png |
Yes, and thanks for that. I may need to ask you about some details of how the percentages apply to each function there, but this could be really useful. I did some basic profiling a while back but it was harder to read. One thing that pops up in my mind is, how often are we repeating (if at all) the bip32 derivations of keys and perhaps addresses; if we are, we could and should of course cache to ensure that never happens. |
So, from the README: OutputA node in the output graph represents a function and has the following layout:
where:
An edge represents the calls between two functions and has the following layout:
Where:
If I read the graphs correctly, our common main entry point to these low level functions is from |
Not sure when, but I'll do a review and if I can see clearly that there are repeated calls to the same derivations, I'll just make some kind of cache object for them, and we can re-do the profile test case and see if it makes a difference (bit vague I know, but, anyway). |
(I should jot down here that |
What if I have a multi-year fidelity bond in my wallet? Can I import the bond into a new wallet? |
#1594 addresses this issue significantly. |
Significant improvements to wallet code performance have been made, it's now more or less usable even with big wallets. More optimizations are always likely possible, but no point in keeping this open IMHO. |
Especially with
wallet-tool
methods (summary
and especiallyhistory
). Have noticed it long time ago, never managed to prioritize to find out what's happening there (although #851 was minor improvement). But it definitely shouldn't be so slow. Here is comment from user in reddit (he's running RPi, but that's not the issue, I have noticed the same on more powerful machines).Tu be clear what is old and a lots of tx history - I mean yg wallets running for years.
The text was updated successfully, but these errors were encountered: