From 90a4fba767d2f538c469b171964861d0a37122c6 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Mon, 25 Sep 2023 15:39:00 +0200 Subject: [PATCH] Improve #1490 performance to use `Ordinal` string comparision and just check for extension on some generated files --- Source/Editor/Windows/ContentWindow.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Editor/Windows/ContentWindow.cs b/Source/Editor/Windows/ContentWindow.cs index 6e0651d60..c65735c4c 100644 --- a/Source/Editor/Windows/ContentWindow.cs +++ b/Source/Editor/Windows/ContentWindow.cs @@ -994,7 +994,7 @@ namespace FlaxEditor.Windows if (!_showAllFiles) items = items.Where(x => !(x is FileItem)).ToList(); if (!_showGeneratedFiles) - items = items.Where(x => !(x.Path.Contains(".Gen.cs") || x.Path.Contains(".Gen.h") || x.Path.Contains(".Gen.cpp") || x.Path.Contains(".csproj") || x.Path.Contains(".CSharp"))).ToList(); + items = items.Where(x => !(x.Path.EndsWith(".Gen.cs", StringComparison.Ordinal) || x.Path.EndsWith(".Gen.h", StringComparison.Ordinal) || x.Path.EndsWith(".Gen.cpp", StringComparison.Ordinal) || x.Path.EndsWith(".csproj", StringComparison.Ordinal) || x.Path.Contains(".CSharp"))).ToList(); _view.ShowItems(items, _sortType, false, true); } }