loading keys.dat takes a huge amount of time (includes possible fix) #533

Open
opened 2013-10-20 01:26:40 +02:00 by AyrA · 0 comments
AyrA commented 2013-10-20 01:26:40 +02:00 (Migrated from github.com)

I start noticing lags in the client with the nearly 4000 addresses I have registered at bitmessage.ch. This goes so far, that the client due to being only "sort of" multi-threaded not being able to do certain tasks.
What I detected so far is, that keys.dat is reloaded every once in a while without any reason. if somebody tries to register an account during this time on bitmessage.ch, the API completely locks up and no longer answers, until the file is completely reloaded. (takes about 10 minutes so far)

is there a reason, the file gets reloaded every once in a while?

What I did to fix it in shared.py was

  1. Adding a new array TMPaddrList = {} on the top of the file
  2. changed reloadMyAddressHashes() to check, if the address has already been added.
if addressInKeysFile in shared.TMPaddrList:
    print 'Address',addressInKeysFile,'already loaded' #existing, do nothing
else:
    print 'loading address',addressInKeysFile #process address
    #ADDRESS_LOADING_HERE

shared.TMPaddrList=configSections

You may want to add something like that to the official code. In the address creation window you tell users to use throw-away addresses to enhance their anonymity. If they do this, they certainly will slow down their client over time.

I start noticing lags in the client with the nearly 4000 addresses I have registered at bitmessage.ch. This goes so far, that the client due to being only "sort of" multi-threaded not being able to do certain tasks. What I detected so far is, that keys.dat is reloaded every once in a while without any reason. if somebody tries to register an account during this time on bitmessage.ch, the API completely locks up and no longer answers, until the file is completely reloaded. (takes about 10 minutes so far) is there a reason, the file gets reloaded every once in a while? What I did to fix it in shared.py was 1. Adding a new array `TMPaddrList = {}` on the top of the file 2. changed reloadMyAddressHashes() to check, if the address has already been added. ``` python if addressInKeysFile in shared.TMPaddrList: print 'Address',addressInKeysFile,'already loaded' #existing, do nothing else: print 'loading address',addressInKeysFile #process address #ADDRESS_LOADING_HERE shared.TMPaddrList=configSections ``` You may want to add something like that to the official code. In the address creation window you tell users to use throw-away addresses to enhance their anonymity. If they do this, they certainly will slow down their client over time.
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Bitmessage/PyBitmessage-2025-02-23#533
No description provided.