This project has moved. For the latest updates, please go here.

Decreasing performance with increasing DB size



first of all, I'm a long-time user of Keepass2Android (offline) and have already donated. Thumbs up for the great software!

I run it on my offline (e.g. no 3G/4G) Samsung Galaxy S2, which I carry with me as a second phone just for Keepass2Android. At the moment I have a database that is ~30MB large and contains also photos of personal IDs, driver's license etc (therefore the size).

I noticed that on my S2 it takes quite a long time to unlock the DB (~20 seconds) and even longer to save changes to the DB (~45 seconds). If I remove the photos from the DB, it becomes 3-5 MB in size, and then the update works much faster.

I thought my S2 was perhaps too old and didn't have enough CPU juice for Keepass2Android's encryption/decryption operations, therefore I performed tests also with an S4 mini and an S6 Edge+. Results for a 30MB DB are below:


Unlocking: ~20 sec
Updating: ~45 sec

S4 Mini

Unlocking: ~20 sec
Updating: ~30 sec

S6 Edge+

Unlocking: ~8 sec
Updating: ~18 sec

As you can see, an upgrade to S4 Mini would not make a big difference, and on the latest hardware generation the update duration is still kind of unsatisfactory. I can imagine use-cases with much bigger DBs out there.

I also tested the storage performance on S6, and it doesn't look to be the bottleneck: a 200MB file was copied to the phone within 10 seconds.

Anything that can be done to improve performance? Is encryption/decryption using all cores of the CPU? Are there maybe ciphers with hardware acceleration that can be used?

Thank you


PhilippC wrote Feb 25 at 5:15 AM

Keepass is not meant to store files. You might try to switch to the KDBX4 format which has improvements for attachment storing:

probspot wrote Feb 25 at 6:35 PM

Thanks, KDBX4 looks promising.

What is the upgrade procedure in case of K2A? Install the newest version, enable new key derivation algo and re-add attachments?