giuspen / cherrytree

cherrytree
https://www.giuspen.net/cherrytree/
Other
3.29k stars 457 forks source link

[CTB] It's too slow/laggy or it takes a while when Undo (Ctrl Z) #2509

Open lbpth opened 1 month ago

lbpth commented 1 month ago

Version, Operative system All CTree version on Windows 11 Pro

Describe the bug When trying to undo, the file will take 0.5-1 or even 2 seconds to reload content. My CTB file is ~1.5MB. But the bug came from the first time I ve used CherryTree. I report today because I ve used Undo more frequently these days. I wish I could report sooner

To Reproduce If applicable, attach a non-personal document where the issue can be reproduced systematically. Steps to reproduce the behavior:

  1. Type or copy and paste any long plain text (should be Unicode format text) to new node
  2. Add some new content by typing anything
  3. Click Edit on 'menu bar' then choose Undo (or just use hotkey Ctrl + Z)
  4. See error.

Of course, if you only have a few rows, it s very smooth, no problem. But if you have a node with long content, it will reload node, go up to the top of content before coming back to the current cursor (before undo). It took me ~2 seconds in total.

Besides that, it is also lagging if you try to scroll a long content node. So sad!

Screenshots No need screenshot

gitvectors commented 1 month ago

Effect not seen here on my Ubuntu 22.04 desktop. I can dual boot but not inclined to jump into Windows to test. Define "long content". I tested by pasting several copies of Cicero speech. Several (3) CT sessions are open running on different projects.

lamborghinipth commented 1 month ago

Effect not seen here on my Ubuntu 22.04 desktop. I can dual boot but not inclined to jump into Windows to test. Define "long content". I tested by pasting several copies of Cicero speech. Several (3) CT sessions are open running on different projects.

I think it happens when I use Unicode text You can test again with long Chinese/ Japanese/ Vietnamese article

giuspen commented 4 weeks ago

I have in the plans to improve the implementation of the undo/redo machine of the rich text nodes to solve this problem and also the unnecessary heavy memory usage.

jonathonmckay commented 1 week ago

I have also seen this behavior.