Skip to content

Encrypt notes asynchronously #3617

Closed
Closed

Description

@ipariparipa

The new encryption method is pretty slow, takes too many time when auto saving. It is a really wrong user experience at typing. You should move the encryption algorithm into a thread.

Activity

  1. pbek commented on May 17, 2026

    @pbek
    Owner

    I tested a 1000 lines note and did not have any delay when saving while typing.

    Can I get a little more context please? What are you comparing it to? What note did you use? How about the logs and settings dump (see issue template)?

  2. added
    Type: Improvement
    and removed on May 18, 2026
  3. changed the title [-][BUG] new encryption method is too slow[/-] [+]Encrypt notes asynchronously[/+] on May 18, 2026
  4. added 2 commits that reference this issue on May 18, 2026
  5. pbek commented on May 18, 2026

    @pbek
    Owner

    26.5.13

    • Improved autosaving encrypted notes by running the expensive Botan encryption
      step in a worker thread, keeping typing responsive while encrypted notes are
      saved and avoiding overwriting newer edits made during encryption
      (for #3617)
  6. pbek commented on May 18, 2026

    @pbek
    Owner

    There now is a new release, could you please test it and report if it works for you?

  7. ipariparipa commented on May 18, 2026

    @ipariparipa
    Author

    hmm… something is not really correct. Now this is extremely slow when typing into the a big enrypted text. It seems it's caused by your previous commit (62b72f1e3da08703e40c0c100ac851c8d8c02fc9, maybe somewhere around of method: NoteEncryptionManager::updateNoteEncryptionUI?) Note: this is maybe not reproducible when debugging with gdb, but I'm not pretty sure.

    a file for testing (pwd: fakutya):
    Háború és béke.md

    Info: "DEFINES=QTKEYCHAIN_NO_EXPORT" is needed for building from main (85b46fb64e62d8bfa21d869a91b0b096127227c1) on linux with submodules.

  8. ipariparipa commented on May 18, 2026

    @ipariparipa
    Author

    more info: it seems the issue described above is no longer reproducible when regenerating the config file ~/.config/PBE/QOwnNotes.conf (and it explains the different behavior in debug ☺). I'm still testing…

    more info # 2: the issue was also not reproducible when I moved the big file into a subdir of Notes, or into a different Notes dir.

  9. Rudolfo1967 commented on May 23, 2026

    @Rudolfo1967

    i experienced data loss using the encrytion function of a note in version 26.5.14!
    What i did:

    1. Made a note and encrypted it
    2. opened that note in the synchronized nextcloud folder at my anfdroid smartphone and saw the text encrypted. But i was able to put in some words beneath the encrypted part in that note in the smartphone.
    3. my nexctcloud client did a sync and after that i openened the note again in QOwnNotes => see the encrypted text (without the added words from the smartphone beneath BUT i was not able to decrypt that note anymore! The decryption symbol in the toolbar is greyed out and now i am not able to use the note anymore!

    Can someone reproduce that behaviour?

  10. pbek commented on May 23, 2026

    @pbek
    Owner

    Are you sure that this feature request has something to do with that? Can you please open a new issue?

  11. Rudolfo1967 commented on May 23, 2026

    @Rudolfo1967

    Are you sure that this feature request has something to do with that? Can you please open a new issue?

    Sorry for "hijacking" this was not my intention. I will open a new issue.

  12. ipariparipa commented on May 23, 2026

    @ipariparipa
    Author

    26.5.13 is definitely OK.
    (regarding the additional issue (when old config file): I will open a new ticket later if needed.)

  13. pbek commented on May 24, 2026

    @pbek
    Owner

    Great, thank you for testing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: Improvement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions