raymontag / keepassc

KeePassC is a curses-based password manager compatible to KeePass v.1.x and KeePassX
http://raymontag.github.com/keepassc/
ISC License
311 stars 23 forks source link

Database opening slow with large DB #72

Closed hevanaa closed 5 years ago

hevanaa commented 6 years ago

A large keepass DB, about 14 MB, now takes almost two minutes to open in keepassc, even on a fast computer (i7-4790K). The same DB opens instantly with KeePass (Linux and Windows). When checking with top it is obvious that one core is loaded a lot doing some python stuff during the opening of the DB.

raymontag commented 6 years ago

I will later look into that but an educated guess would be that PyCrypto (the used crypto library) is the bottleneck.

hevanaa commented 6 years ago

PyCrypto seems to be dead https://github.com/dlitz/pycrypto/issues/173 And is dangerously buggy https://github.com/dlitz/pycrypto/issues/176 Best would be to replace with something else. Maybe https://github.com/Legrandin/pycryptodome? Claims to be fork and replacement for PyCrypto.

raymontag commented 6 years ago

Thanks for the suggestion, I changed it to PyCryptodome

hevanaa commented 6 years ago

It looks like it is faster with pycryptodomex, about half a minute to open the large 14 MB DB (I haven't timed it precisely). But I made the DB smaller (about 2 MB) by removing old stuff, so now it is not a big problem anymore (opens in a second or two).