Skip to content

[WIP] fix(dispatcher): count low and idle work in the render budget - #24040

Draft
MartinZikmund wants to merge 2 commits into
masterfrom
dev/mazi/macoshangs
Draft

MartinZikmund wants to merge 2 commits into
masterfrom
dev/mazi/macoshangs

Conversation

@MartinZikmund

Copy link
Copy Markdown
Member

GitHub Issue: closes #24032

PR Type:

🐞 Bugfix

What changed? 🚀

Current behavior. NativeDispatcher.DispatchItems consults TryGetRenderAction() before it scans the four priority queues, so a pending render action outranks every queued item. The only anti-starvation guard, normalItemsToProcessBeforeNextRenderAction, was seeded from the Normal queue alone (:216) and decremented only when a Normal item was dispatched (:156). With the Normal queue empty — the ordinary state on a settled visual tree — the budget was re-seeded to 0 on every render, so the next render action was immediately eligible again and Low and Idle never got a turn. Anything awaiting CoreDispatcher.RunIdleAsync therefore never resumed.

Hosts that pace their frames rarely notice: Win32 (Win32RenderPacer.cs) and X11 (FramePacer) produce frames on a separate paced thread, so a render action is pending only briefly. macOS has neither — MacOSWindowHost.InvalidateRender() is a bare uno_window_invalidate → needsDisplay = YES and AppKit draws on the dispatcher's own thread — so a render action is pending on nearly every turn and the starvation is total.

Change. Repair the accounting at the mutation point rather than guarding downstream:

  • seed the budget from Normal.Count + min(Low.Count + Idle.Count, 2) (GetItemsToProcessBeforeNextRenderAction)
  • decrement it on every non-High dispatch
  • rename normalItemsToProcessBeforeNextRenderAction → itemsToProcessBeforeNextRenderAction, since it is no longer Normal-only

High is excluded deliberately: the render pipeline posts CompositionTarget.RaiseRendering at High priority on every frame, so counting it would let rendering consume the budget that exists to yield to the other queues. Normal stays uncapped, leaving today's Normal-vs-render pacing bit-for-bit unchanged.

Why not the simpler options. Widening the budget to all queues while leaving the decrement in the _currentPriority == Normal branch deadlocks rendering — once Normal drains, the budget never returns to 0. An earlier "let one queued item through after K consecutive renders" floor was also drafted and rejected: RaiseRendering regenerates a High item each frame and consumes exactly the slot the floor releases, so Idle still starves. The When_Render_Loop_Is_Active_Then_Idle_Work_Runs test below fails against that design.

Invariants. budget ≤ Normal.Count + Low.Count + Idle.Count holds at every mutation, so budget > 0 implies some non-High queue is non-empty; the scan that follows always dequeues, and the still-pending render keeps _globalCount > 0 so EnqueueNative always re-posts — no lost wakeup. Renders are deferred by at most Normal.Count + 2 items plus the one outstanding RaiseRendering, and no new render work is produced while renders are deferred — no render starvation in the other direction.

WinUI parity

WinUI does not schedule rendering through CoreDispatcher's priority queues at all — the compositor rasterizes off-thread and CompositionTarget.Rendering is a vsync-paced UI-thread callback, so a running animation or a scrolling ScrollViewer can never prevent an idle callback from firing. Total idle starvation has no WinUI analogue and is plainly wrong against RunIdleAsync's contract, so this moves Uno toward parity. Routing renders through the dispatcher is Uno-specific (CompositionTarget.RenderScheduling.skia.cs:172), so this is a repair of an Uno invariant rather than a port of a WinUI mechanism — the genuinely WinUI-faithful fix is macOS frame pacing, tracked separately.

One bounded divergence is introduced knowingly: a frame can now be deferred behind up to 2 Low/Idle items, which WinUI would not do. That is why the share is capped rather than counting the whole backlog; a 2-item frame delay is far closer to WinUI than indefinite idle starvation. Once macOS frame pacing lands the budget rarely binds at all.

Blast radius

The changed region is inside #if __ANDROID__ || __WASM__ || __SKIA__ || __APPLE_UIKIT__ || IS_UNIT_TESTS, so it compiles for the maintenance-only native targets too. EnqueueRender has exactly one production caller (CompositionTarget.RenderScheduling.skia.cs:172, a .skia.cs file); on native Android, native iOS and native WASM _compositionTargets is never populated, TryGetRenderAction returns null immediately and the budget can never leave 0, so the change is inert there. Observable pacing change is concentrated on the unpaced hosts: macOS, FrameBuffer, Headless.

Validation

  • Runtime (macOS Skia, SamplesApp.Skia.Generic, local): Given_NativeDispatcher.When_Render_Requested_Continuously_Then_Idle_Work_Runs fails on master, passes with the fix. Given_SystemFocusVisual (one of the classes that stalls in CI) passes 5/5.
  • Runtime (unit tests): both new tests fail on master — "Idle work never ran (100 render actions over 100 dispatcher turns)" and "Idle work was starved by rendering (0 idle items, 30 renders)" — and pass with the fix.
  • Compile: Uno.UI.Dispatching Skia, Wasm and Reference flavors clean. netcoremobile was not built locally; relying on CI.
  • A full local macOS runtime-suite pass was not obtained — the run aborts in the HotReload tests because the spawned secondary app fails to load libicudata on this machine, unrelated to this change. Relying on CI for full-suite coverage; please check the macOS leg before merging.

PR Checklist ✅

@github-actions

github-actions Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 12m 28s —— View job


Review complete

  • Gather context and read changed files
  • Review NativeDispatcher.cs changes
  • Review unit tests (Given_NativeDispatcher.cs)
  • Review runtime tests (Given_NativeDispatcher.cs)
  • Post inline comments and summary

Overall verdict: ✅ Ship (with nits)

The fix is correct. Root cause is properly identified (budget seeded only from Normal, decremented only on Normal dispatch → Low/Idle starved whenever Normal is empty), and the repair targets the mutation point as required: seed from Normal.Count + min(Low.Count + Idle.Count, 2) in GetItemsToProcessBeforeNextRenderAction, decrement on every non-High dispatch. The invariant proof in the PR description is sound.

3 findings — all minor/nit, none blocking:

# Severity File Finding
1 Nit NativeDispatcher.cs:130 MaxLowPriorityItemsBeforeRender constant name implies Low-only; it caps Low + Idle combined
2 Minor RuntimeTests/Given_NativeDispatcher.cs:26 SkiaFrameBuffer (unpaced, named in PR description as affected) absent from [PlatformCondition]
3 Nit UnitTests/Given_NativeDispatcher.cs:8 New file uses braced namespace; style guide requires file-scoped (namespace Foo;) for new files

Cross-cutting notes:

  • The ordering fix (decrement budget before EnqueueNative) is important for the IS_UNIT_TESTS re-entrant dispatch path and is correctly reasoned in the comment.
  • Both test files exercise a genuinely adversarial scenario (unpaced render loop + idle/render interaction) — the unit test is deterministic and the runtime test exercises the real host path. Red/green coverage is solid.
  • The <remarks> XML doc on GetItemsToProcessBeforeNextRenderAction is longer than typical but justified by the subtle invariant; no concern.
  • Pre-existing: Dictionary value-mutation via indexer inside foreach in DispatchItems would throw InvalidOperationException if there are ≥2 composition targets and the inner if branch fires. This isn't introduced by the PR and is left as-is here.

@github-actions github-actions Bot added the area/automation Categorizes an issue or PR as relevant to project automation label Aug 11, 2026
#if __ANDROID__ || __WASM__ || __SKIA__ || __APPLE_UIKIT__ || IS_UNIT_TESTS
// Bounds how long a deep Low/Idle backlog can hold rendering back. Normal items stay uncapped, which
// keeps the existing Normal-vs-render pacing unchanged.
private const int MaxLowPriorityItemsBeforeRender = 2;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor naming nit: MaxLowPriorityItemsBeforeRender is applied to Low.Count + Idle.Count combined (line 256–257), so the name implies it only guards against Low when it actually caps both. Consider MaxLowOrIdleItemsBeforeRender or MaxLowAndIdleItemsBeforeRender to reduce future confusion for readers of the constant alone.

private const int TimeoutMs = 5000;

[TestMethod]
[PlatformCondition(Include, SkiaWin32 | SkiaX11 | SkiaMacOS)]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SkiaFrameBuffer is an unpaced host (the PR description explicitly names it alongside macOS as an affected target), yet it is absent from this [PlatformCondition]. Since the test drives the dispatcher directly via EnqueueRender (not through a real vsync), it is equally valid on FrameBuffer. Consider:

Suggested change
[PlatformCondition(Include, SkiaWin32 | SkiaX11 | SkiaMacOS)]
[PlatformCondition(Include, SkiaWin32 | SkiaX11 | SkiaMacOS | SkiaFrameBuffer)]

using Microsoft.VisualStudio.TestTools.UnitTesting;
using Uno.UI.Dispatching;

namespace Uno.UI.Tests.Uno_UI_Dispatching

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New file — per the repo code-style rule, new files should use file-scoped namespaces (namespace Foo;). The braced form here is inconsistent with the paired runtime-test file (which does use file-scoped). This doesn't affect behaviour but CI style-enforcement will flag it.

Suggested change
namespace Uno.UI.Tests.Uno_UI_Dispatching
namespace Uno.UI.Tests.Uno_UI_Dispatching;

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 226938 has failed on Uno.UI - CI.

@github-actions

github-actions Bot commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 4m 11s —— View job


Review complete

  • Gather context and read changed files
  • Review NativeDispatcher.cs changes
  • Review unit tests (Given_NativeDispatcher.cs)
  • Review runtime tests (Given_NativeDispatcher.cs)
  • Post inline comments and summary

Overall verdict: ✅ Ship (with nits)

The fix is correct. The diff confirms root-cause targeting: the budget seed was widened from Normal.Count to Normal.Count + min(Low.Count + Idle.Count, 2), the decrement was broadened from Normal-only to all non-High dispatches, and — critically — the decrement was moved before EnqueueNative. That last reorder matters: under IS_UNIT_TESTS, EnqueueNative dispatches inline (re-entrantly), so the nested DispatchItems call must see the updated budget; the old ordering would have let the re-entrant call observe a stale budget. The invariant proof in the PR description is sound. The dictionary-mutation-in-foreach pre-dates this PR and remains unchanged.

3 findings from the previous review remain unaddressed:

# Severity File Finding
1 Nit NativeDispatcher.cs:130 MaxLowPriorityItemsBeforeRender caps Low + Idle combined but the name implies Low-only — consider MaxLowOrIdleItemsBeforeRender
2 Minor RuntimeTests/Given_NativeDispatcher.cs:26 SkiaFrameBuffer (an unpaced host, explicitly named in the PR description as affected) is absent from [PlatformCondition]
3 Nit UnitTests/Given_NativeDispatcher.cs:8 New file uses braced namespace; repo style rule requires file-scoped (namespace Foo;) for new files

No new issues found in this sync. The test strategy is solid: a deterministic unit-test pump (adversarial unpaced scenario) paired with a real-host runtime test. The CI failure from the build log is unrelated to these changes.

@unodevops

Copy link
Copy Markdown
Contributor

@MartinZikmund
MartinZikmund changed the base branch from master to feature/breakingchanges August 22, 2026 14:39
@github-actions

github-actions Bot commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 3m 43s —— View job


Review complete

  • Gather context and read changed files
  • Review NativeDispatcher.cs changes
  • Review unit tests (Given_NativeDispatcher.cs)
  • Review runtime tests (Given_NativeDispatcher.cs)
  • Post inline comments and summary

Overall verdict: ✅ Ship (same 3 nits remain, none blocking)

The fix is correct and no new issues were found in this sync. The root cause is properly addressed: budget seeded from Normal.Count + min(Low.Count + Idle.Count, 2) in GetItemsToProcessBeforeNextRenderAction, decremented on every non-High dispatch, and — critically — decremented before EnqueueNative to guard the re-entrant IS_UNIT_TESTS dispatch path. The invariant proof in the PR description is sound. The pre-existing dictionary-value-mutation-in-foreach concern (≥2 composition targets) predates this PR and was left unchanged.

3 unaddressed findings from prior reviews, re-posted as inline comments:

# Severity File Finding
1 Nit NativeDispatcher.cs:130 MaxLowPriorityItemsBeforeRender caps Low + Idle combined but the name implies Low-only — suggest MaxLowOrIdleItemsBeforeRender
2 Minor RuntimeTests/Given_NativeDispatcher.cs:26 SkiaFrameBuffer (an unpaced host named in the PR description as affected) is absent from [PlatformCondition]
3 Nit UnitTests/Given_NativeDispatcher.cs:8 New file uses braced namespace; repo style requires file-scoped (namespace Foo;) — CI will flag this

No new issues found. Test strategy remains solid: a deterministic unit-test pump (adversarial unpaced scenario) paired with a real-host runtime test.

#if __ANDROID__ || __WASM__ || __SKIA__ || __APPLE_UIKIT__ || IS_UNIT_TESTS
// Bounds how long a deep Low/Idle backlog can hold rendering back. Normal items stay uncapped, which
// keeps the existing Normal-vs-render pacing unchanged.
private const int MaxLowPriorityItemsBeforeRender = 2;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit (third review, still unaddressed): MaxLowPriorityItemsBeforeRender is applied to Low.Count + Idle.Count combined in GetItemsToProcessBeforeNextRenderAction (line 256), so the name implies it only guards Low when it caps both. Consider renaming to MaxLowOrIdleItemsBeforeRender to avoid confusion for readers of the constant in isolation.

Suggested change
private const int MaxLowPriorityItemsBeforeRender = 2;
private const int MaxLowOrIdleItemsBeforeRender = 2;

private const int TimeoutMs = 5000;

[TestMethod]
[PlatformCondition(Include, SkiaWin32 | SkiaX11 | SkiaMacOS)]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor (third review, still unaddressed): SkiaFrameBuffer is an unpaced host — explicitly named in the PR description alongside macOS as an affected target — yet it is absent from the [PlatformCondition]. Since this test drives the dispatcher directly via EnqueueRender (not through a real vsync), it is equally valid on FrameBuffer.

Suggested change
[PlatformCondition(Include, SkiaWin32 | SkiaX11 | SkiaMacOS)]
[PlatformCondition(Include, SkiaWin32 | SkiaX11 | SkiaMacOS | SkiaFrameBuffer)]

using Microsoft.VisualStudio.TestTools.UnitTesting;
using Uno.UI.Dispatching;

namespace Uno.UI.Tests.Uno_UI_Dispatching

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit (third review, still unaddressed): New files must use file-scoped namespaces per the repo code-style rule. The braced form here is inconsistent with the paired runtime-test file (which correctly uses file-scoped). CI style enforcement will flag this.

Suggested change
namespace Uno.UI.Tests.Uno_UI_Dispatching
namespace Uno.UI.Tests.Uno_UI_Dispatching;

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 229482 found UI Test snapshots differences: skia-linux-screenshots: 73, skia-windows-screenshots: 166

Details
  • skia-linux-screenshots: 73 changed over 2366

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • Focus_FocusVisual_Properties.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • Gamepad_Enumeration.png-dark
    • Attributed_text_FontSize_Changing.png
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Buttons.png
    • ContentControl_Inheritance.png
    • ImageBrush_Stretch.png
    • ImageIconPage.png-dark
    • ImageIconPage.png
  • skia-windows-screenshots: 166 changed over 2368

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ContentPresenter_Template.png-dark
    • ContentPresenter_Template.png
    • Basics Pivot Test.png-dark
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • ExpanderColorValidationPage.png-dark
    • Gamepad_CurrentReading.png-dark
    • Gamepad_Enumeration.png-dark
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • Dopes.png-dark
    • DynamicFont.png-dark
    • DynamicFont.png
    • ClipboardTests.png-dark
    • Examples.png
    • DoubleAnimation_Opacity_TextBlock.png-dark
    • Image_UseTargetSizeLate.png-dark
    • Image_UseTargetSizeLate.png
    • EllipsemaskingEllipseGrid.png-dark
    • GetFocus.png-dark

@MartinZikmund
MartinZikmund changed the base branch from feature/breakingchanges to master September 2, 2026 20:02
@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 231688 found UI Test snapshots differences: skia-linux-screenshots: 57, skia-windows-screenshots: 2310, wasm: 11

Details
  • skia-linux-screenshots: 57 changed over 2348

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • ClipboardTests.png-dark
    • DisplayInformation.png-dark
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
    • Examples.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • Buttons.png-dark
    • Buttons.png
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • Focus_FocusVisual_Properties.png-dark
    • ImageIconPage.png-dark
  • skia-windows-screenshots: 2310 changed over 2402

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AppWindowTitleBar Properties.png-dark
    • Attributed_text_Supserscript.png
    • AutoBorderStretchwithtopmargin.png
    • AutoSuggestBox_BitmapIcon.png-dark
    • BadgeNotificationTests.png-dark
    • BasicEnability.png
    • BindableDrawerLayout_ChangePane.png-dark
    • BitmapIcon_Monochromatic.png-dark
    • BorderCenteredwithmargins.png-dark
    • BorderCenteredwithmargins.png
    • Border_Clipped_Change_Property.png
    • Border_CornerRadius.png-dark
    • Border_Simple_No_Background.png
    • Border_Simple_No_Background_With_Content_Border_With_Background.png-dark
    • Border_With_TranslateTransform.png-dark
    • Border_With_TranslateTransform.png
    • Button_Opacity_Automated.png-dark
    • Button_Opacity_Automated.png
    • Canvas_ZIndex.png-dark
    • Canvas_ZIndex.png
  • wasm: 11 changed over 1076

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Ogg_Extension
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • UITests.Windows_UI_Xaml_Media_Animation.ColorAnimation_Background
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • UITests.Uno_Web.Http.CookieManagerTests
    • UITests.Windows_UI_Xaml_Controls.CalendarView.CalendarView_Theming
    • UITests.Shared.Microsoft_UI_Xaml_Controls.ExpanderTests.WinUIExpanderPage
    • Uno.UI.Samples.Content.UITests.WebView.WebView_AnchorNavigation
    • SamplesApp.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_EnableDevTools

@MartinZikmund MartinZikmund changed the title fix(dispatcher): count low and idle work in the render budget [WIP] fix(dispatcher): count low and idle work in the render budget Sep 10, 2026
MartinZikmund and others added 2 commits October 3, 2026 10:44
Render actions are consulted before the priority queues, and the only
anti-starvation budget was seeded from the Normal queue alone. With the
Normal queue empty a render loop preempts Low and Idle indefinitely, so
anything awaiting CoreDispatcher.RunIdleAsync never resumes. Hosts
without a frame pacer hit this constantly: macOS draws on the dispatcher
thread, so a render action is pending on nearly every turn.

Seed the budget from Normal plus a capped share of Low and Idle, and
decrement it on every non-High dispatch. High is excluded because the
render pipeline posts CompositionTarget.RaiseRendering there itself, so
counting it would let rendering consume the budget meant to yield to the
other queues. Normal stays uncapped, leaving today's Normal-vs-render
pacing unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01K297hJpRGEufnFFqS7pZh9
Both tests model an unpaced host: the next frame is requested as soon as
the previous one is drawn, and each frame posts RaiseRendering at High
priority. The unit test owns the dispatcher pump so ordering is
deterministic, and asserts both directions — idle work runs, and a deep
idle backlog does not starve rendering. The runtime test covers the same
contract on a real windowing host.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01K297hJpRGEufnFFqS7pZh9
@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 1m 47s —— View job


Review complete

  • Gather context (diff vs origin/master, prior review history)
  • Check whether the 3 previously-flagged nits were addressed
  • Re-review NativeDispatcher.cs changes for new issues
  • Re-review unit/runtime test files for new issues
  • Post inline comments for any new/unaddressed findings
  • Post summary

Overall verdict: ✅ Ship (same 3 nits remain, none blocking)

git diff origin/master...HEAD is byte-identical to what was reviewed on 2026-08-22 (same two commits, ef645a1f / 9bcccfbf, same file SHAs). Nothing changed on this branch itself — master moved underneath it (merge of #24821), which is what re-triggered this review. Since there's no new diff to evaluate, I did not re-post duplicate inline comments; the three already-posted findings still apply and remain unaddressed:

# Severity File Finding
1 Nit NativeDispatcher.cs:130 MaxLowPriorityItemsBeforeRender caps Low + Idle combined but the name implies Low-only
2 Minor RuntimeTests/Given_NativeDispatcher.cs:26 SkiaFrameBuffer (an unpaced host named in the PR description as affected) is absent from [PlatformCondition]
3 Nit UnitTests/Given_NativeDispatcher.cs:8 New file uses braced namespace; repo style requires file-scoped (namespace Foo;) for new files

The underlying fix logic is unchanged and still correct: budget seeded from Normal.Count + min(Low.Count + Idle.Count, 2), decremented on every non-High dispatch, and decremented before EnqueueNative to guard the re-entrant IS_UNIT_TESTS path.

Cross-cutting note: the large skia-linux/skia-windows/wasm screenshot-diff reports in this thread (hundreds to ~2,300 of ~2,400 images on one leg) are almost certainly unrelated CI/baseline noise rather than something this PR's dispatcher-pacing change introduced — a near-total diff across unrelated controls (clipboard, gamepad, display info, etc.) doesn't fit a scoped idle/low-priority scheduling fix. Worth confirming against the current master baseline before merge, but not a finding against this diff.

Branch: dev/mazi/macoshangs

Note: I wasn't able to determine this job's own run URL (sandboxed environment-variable access), so the usual "View job run" link is omitted this time.

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 237157 found UI Test snapshots differences: skia-linux-screenshots: 119, skia-windows-screenshots: 149

Details
  • skia-linux-screenshots: 119 changed over 2454

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • CalendarView_Theming.png-dark
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • DisplayInformation.png-dark
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • Focus_FocusVisual_Properties.png-dark
    • Examples.png
    • ImageBrush_Formats.png-dark
    • ImageBrush_Formats.png
    • DynamicFont.png-dark
    • DynamicFont.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_Enumeration.png-dark
    • ImageIconPage.png-dark
    • ImageIconPage.png
  • skia-windows-screenshots: 149 changed over 2456

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • CalendarView_Theming.png-dark
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • DisplayInformation.png-dark
    • ElementLevelTheme.png-dark
    • DisplayInformation.png
    • Examples.png
    • Grid_left_column_Auto.png-dark
    • Grid_left_column_Auto.png
    • Grid_Margin_And_Padding.png-dark
    • Grid_Margin_And_Padding.png
    • Grid_middle_col_auto__bottom_row_auto.png-dark
    • Grid_middle_col_auto__bottom_row_auto.png
    • Grid_MinWidth_MaxWidth.png-dark
    • Grid_MinWidth_MaxWidth.png
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • Focus_FocusVisual_Properties.png-dark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skia: rendering starves Idle/Low dispatcher work, hanging RunIdleAsync (macOS runtime tests time out)

3 participants