mailchain / mailchain-legacy

Using Mailchain, blockchain users can now send and receive rich-media HTML messages with attachments via a blockchain address.
https://mailchain.xyz
Apache License 2.0
143 stars 51 forks source link

feat: speed up getting messages #731

Closed robdefeo closed 3 years ago

robdefeo commented 3 years ago

Deriving keys with scrypt takes a long time ~800ms. This is being done for each messages. The only difference is the decryptedKind which is often the same. Used a map to reduce the number of times this happens.