spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.44k stars 3.09k forks source link

Startup takes to long #4041

Closed bitcoinmichi closed 6 years ago

bitcoinmichi commented 6 years ago

Not a bug per so but when trying to startup Electrum 3.1.0 (32 bit) its takes about 30 seconds until the GUI is loaded.

Windows 10 Professional (64 bit) Version 1709 Build 162299.248

After the GUI has been loaded its is in limbo for about 20 sec more using 20% of my CPU. Tag Bar shows: Syncronizing...

SomberNight commented 6 years ago

Where is the 30 second delay exactly? Is this for an encrypted wallet, after entering the password, but before the main window shows up?

bitcoinmichi commented 6 years ago

I do not have to enter a password for starting the GUI. The only time i need to enter a password is when I send BTC.

I just have received a BTC payment and now electrum is hanging again for over 5 minutes with constand CPU usage of 5%

bitcoinmichi commented 6 years ago

When switching back to an older Electrum version all is running good.

SomberNight commented 6 years ago

I do not have to enter a password for starting the GUI. The only time i need to enter a password is when I send BTC.

I see; then your wallet file is not encrypted, only the keystore is, which is fine.

When switching back to an older Electrum version all is running good.

What version? 3.0.6?

How big is this wallet of yours? Roughly how many transactions and addresses are there in it?

bitcoinmichi commented 6 years ago

Version 3.0.5 (never had installed version .6)

There are about 2700 transactions in my wallet

Filter CHANGE 120 used addresses 10 funded addresses 6 unused addresses

Filter Receiving 12 funded addresses 1800 used addresses 1800 unused addresses

ecdsa commented 6 years ago

it might be related to the new capital gains calculation. can you disable the exchange rate (in preferences, set Fiat currency to None), and tell us if it makes a difference?

bitcoinmichi commented 6 years ago

Fiat Currency setting was set to none by default but still hanging with CPU usage high. I set it ON and OFF to check for any differences but could not find any.

SomberNight commented 6 years ago

Even with fiat disabled, the fiat calculations were being done. fixed in https://github.com/spesmilo/electrum/commit/d0025491760aab9040ba31e2683adb220fd80345

ecdsa commented 6 years ago

oh, good point. that means the test above does ot work. capital gains are computed recursively, which means that the same average price computation may be repeated many times. with a proper data structure it would be possible to avoid that

ecdsa commented 6 years ago

didnt see your PR :)