Describe the bug
Cut/Copy selected text operation is extremely slow.
To Reproduce
Download latest version of Notepads from MS Store and install.
Open small text file (< 1000 lines or 10K chars in pure English ascii file)
Select few lines of text and cut or copy with ^C /^X key or from context menu.
It takes about 4-5 seconds to finish text copying, regardless of text file size or selected text size.
During such copy/cut operation freeze, application does not respond any key/mouse click/scroll. Context menu does not disappear and remain on screen. After 4-5 secs, it unfreeze and copy is done.
This symptom is 100% reproducible, always. Not intermittent glitch.
Expected behavior
The cut/copy operation should finish instantly.
Screenshots
None.
Desktop (please complete the following information):
OS: Windows 11 (22H2 OS Build 25357.1) [Version 10.0.25357.1]
Version : v1.4.9.0 from MS Store.
Additional context
No other glitch or anomaly. All other edit operations like pasting large text or undo/redo operations (including cut) are blazingly fast. So text cut/copy operation itself is not culprit. It looks like doing something like memory garbage collection. I have lots of free memory.
While this Notepads is frozen for 4-5 secs, I can move to other windows editor and tried to paste the copied text. But it pastes old clipboard content, not new text copied from Notepads. So notepads does not copy to clipboard until it is unfrozen.
No other editors shows such extremely slow copy behavior. Even feature-rich Visual Studio Code or Visual Studio editor does it instantly, not to mention window notepad.
Even I tried to built app from github source, but symptom is same. IMHO, the culprit is
In Notepads\src\Notepads\Controls\TextEditor\TextEditor.xaml.cs : line 813
This line ==> Clipboard.SetContentWithOptions(dataPackage,
new ClipboardContentOptions() { IsAllowedInHistory = true, IsRoamable = true });
The Clipboard.SetContentWithOptions() call takes very long time to return (> 3-4 secs).
When the line is changed to Clipboard.SetContent(dataPackage);, the freezing on cut/copy is fixed.
@qqkookie Hello! I have the same issue. Have you found any solutions to this bug? It was driving me insane thinking I broke something essential to Windows when I was optimizing it.
Describe the bug Cut/Copy selected text operation is extremely slow.
To Reproduce
Expected behavior
Screenshots None.
Desktop (please complete the following information):
Additional context
Notepads\src\Notepads\Controls\TextEditor\TextEditor.xaml.cs
: line 813The
Clipboard.SetContentWithOptions()
call takes very long time to return (> 3-4 secs).When the line is changed to
Clipboard.SetContent(dataPackage);
, the freezing on cut/copy is fixed.