Right, I've done some research and the news are not very good.
In my testing, I've found that
allEncryptedTiddlersAsHtml
takes ~4 seconds and encrypt
takes 7-9 seconds. While it may be possible to optimize the first part, the second one is hardly optimizable (well, may be updating sjcl to 1.0.8 will improve this, but I doubt that) – it's kinda normal that encrypting that much characters requires that much time.
So the only real solution I can think of is to try to create a web worker which will do the heavy encryption work, and save once it reports back. The problem is, the current core updateOriginal isn't supposed to be async. I'll think about adding async support in the next core version, but that's not trivial in terms of backward compatibility, plus I'm not sure if moving all the necessary bits of code to a worker will create an overhead which affects performance as well.
So I can't really promise that I'll fix this soon (I'll see what I can do in the next core release, though). In fact, it seems that for such case it's more practical to do encryption on back-end, which requires another solution.
суббота, 3 июня 2023 г. в 09:11:08 UTC+3, Wolfgang: