greenart7c3/Amber

Disk operations on Decrypt are slow

Opened this issue · 1 comments

Loading and saving the account in each decrypt request is quite slow. You might want to add a cache and just keep the account in memory while the app runs. Also, I am not sure what has changed to require saving after decryption.

Since this method can be called 1000s of times, every inch of performance gain is welcome :)

val account = LocalPreferences.loadFromEncryptedStorage(projection[2]) ?: return null

LocalPreferences.saveToEncryptedStorage(account)

The saving was not needed and I made some changes in the nip46 branch.
I'll try to release a new version next week.
If you want to make some more tests try compiling the nip46 branch to see if it improved the performance