Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extremely slow clipboard operation when some clipboard monitor application running #9106

Open
cuiliang opened this issue May 15, 2024 · 1 comment
Labels
Investigate Requires further investigation by the WPF team.

Comments

@cuiliang
Copy link

cuiliang commented May 15, 2024

Description

When running software that includes clipboard monitoring features, all WPF applications on the computer may become extremely slow when performing clipboard copy operations. Meanwhile, other programs such as Winform applications, browsers, and Windows Notepad operate normally.
Symptoms: When selecting "Copy" (or "Cut") from the right-click menu in any text box, it takes 0.5 to 1 second for the menu to close.

QQ2024515-84422.mp4

Compared to winform application:

QQ2024515-85941.mp4

Reproduction Steps

TestClipboard.zip

  1. Download and unzip the above TestClipboard.zip file, and unzip to a folder.
  2. Sample application was based on .Net8, you should have .Net8 installed on your computer.
  3. Start the applications in the following order. (Order is important) 1) WpfApp1.exe 2) ClipobardMonitor.exe 3) InsideClipboard.exe

image

  1. Select some text in WpfApp1.exe window, right click, then select COPY menu. it will close with big delay.
default.mp4

Expected behavior

Copy operation should complete immediately.

Actual behavior

Copy will complete with big delay and UI freeze.

Regression?

This problem exists for a long time, both .NET framework and .Net8.

Known Workarounds

No workgorund.

Impact

Very bad user experience.

Configuration

No response

Other information

Time was costed in System.Windows.Clipboard.CriticalSetDataObject, It fails to olesetclipboard and retry many times with Sleep().

0d5a2326547d4ed4f458a69531d2a057
@cuiliang cuiliang changed the title Extremely slow COPY operation when some clipboard monitor application running Extremely slow clipboard operation when some clipboard monitor application running May 15, 2024
@Kuldeep-MS Kuldeep-MS added the Investigate Requires further investigation by the WPF team. label May 15, 2024
@rampaa
Copy link

rampaa commented May 17, 2024

+1. This is really annoying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Investigate Requires further investigation by the WPF team.
Projects
None yet
Development

No branches or pull requests

3 participants