microsoft / microsoft/microsoft-ui-xaml

UI (visual) is slow to respond to input events unless CompositionTarget.Rendering handler is added

Open
#11,144 4 comments 2 reactions 0 assignees View on GitHub
area-Performance bug team-CompInput
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

### Describe the bug

If I have a list of items/buttons each of which has a mouse-over state and I move the mouse across the list quite fast, often none of the hover states are displayed, and the UI feels very sluggish. Adding a CompositionTarget.Rendering handler ensures that the hover states are displayed and the UI feels responsive. Note that if the VS debugger is attached then the issue seems not to occur, so don't test with the debugger attached. This issue was not present in UWP. Note this is different from other bugs which have described CompositionTarget.Rendering as being slow/limited. For me it is a solid 60fps when a handler is attached. The problem is when a handler is not attached.

### Why is this important?

This results in the UI in WinUI 3 apps feeling very sluggish. I am tempted to add a CompositionTarget.Rendering handler to force the UI to be responsive (but presumably this is bad from a system resource usage point of view).

### Steps to reproduce the bug

See the description.

### Actual behavior

Sluggish UI

### Expected behavior

Responsive UI

### Screenshots

_No response_

### NuGet package version

2.1

### Windows version

Windows 11 (24H2): Build 26100

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

No source file or test is identified in the report. Start by reproducing the hover interaction in a WinUI 3 app using package 2.1 on Windows 11 24H2, without the VS debugger, and compare behavior with and without a CompositionTarget.Rendering handler. Done means input and hover states remain responsive without requiring that handler.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop, frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.