From 0d1882d97f61e8385c8666352be0e3b05be3f7b5 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Sun, 26 Nov 2023 22:14:04 +0100 Subject: [PATCH] Render: Performance fix --- Pal.Client/Floors/FrameworkService.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Pal.Client/Floors/FrameworkService.cs b/Pal.Client/Floors/FrameworkService.cs index 49e89ee..eb00900 100644 --- a/Pal.Client/Floors/FrameworkService.cs +++ b/Pal.Client/Floors/FrameworkService.cs @@ -176,7 +176,15 @@ internal sealed class FrameworkService : IDisposable foreach (var location in memoryTerritory.Locations) { bool isEnabled = DetermineVisibility(location, visibleLocations); - if (location.RenderElement == null || !location.RenderElement.IsValid) + if (location.RenderElement == null) + { + if (isEnabled) + return true; + else + continue; + } + + if (!location.RenderElement.IsValid) return true; if (location.RenderElement.Enabled != isEnabled)