question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Preview 5] Constant FrameMessages being sent in previewer

See original GitHub issue

Describe the bug In Preview 5, when a xaml file is open in the designer the previewer process is sending constant FrameMessages for no reason (VS is just sitting open while I type this and we’re already at sequence id 17 000+).

I’ve traced this back to nightly CI build 11.0.999-cibuild0029216-beta which was built on Jan 29. I think that corresponds to #10120 as the package is the second nightly package on the 29th and that was the second PR merged, and the PR changes show some changes with the previewer. See comment for update

This also leads to VS using a constant 20-ish% CPU and leads to a lag in visual studio if the preview window is left open long enough.

image

Issue Analytics

  • State:closed
  • Created 8 months ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
grokyscommented, Apr 18, 2023

Actually, maybe the problem is that Compositor.AfterCommit gets raised twice:

  • Once synchronously via:
    • CompositingRenderer.Paint
    • CompositionTarget.ImmediateUIThreadRender
    • Compositor.Commit
  • Once asynchronously via:
    • CompositingRenderer.Paint
    • CompositingRenderer.QueueUpdate
    • Compositor.RequestCompositionUpdate
    • Compositor.RequestCommitAsync
1reaction
grokyscommented, Apr 18, 2023

Seems to be caused because although the compositor is being run on the main thread, the commit message is raised using Dispatcher.UIThread.Post:

https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Base/Rendering/Composition/Compositor.cs#L74

This causes it to arrive after RemoteServerTopLevelImpl.RenderIfNeeded exits.

This means that when RemoteServerTopLevelImpl.QueueNextRender is called, _inRender has been set to false, causing the top level impl to think that a new render has completed due to an invalidation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Random stuttering in preview which goes into recorded ...
OBS was fine for me until I upgraded my Monitor. Now the preview window shows a still picture and all videos stutter and...
Read more >
Vegas Pro 18 Preview Stutter on Windows 10
When is shows "GPU 0 Video Decode" it stutters. It's as if there is some kind of constant buffering going on. I realize...
Read more >
Mac QuickLook Preview Not Working (How to Fix) - YouTube
Here is exactly what to do when your mac finder spacebar preview is not working. All the important information is shown in the...
Read more >
Low framerate (not lag) in preview
Changing the comp frame rate to 120 fps is not recommended at all. Check your Preview panel. The Frame rate should always be...
Read more >
How to Fix the 'Cached Preview' Error in After Effects
Here's a step-by-step guide for fixing the 'Cached Preview Needs 2 or More Frames to Playback' error in After Effects. 1. PURGE RAM...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found