From 960df4144c476155635aadafe776693efe662ffd Mon Sep 17 00:00:00 2001 From: alrun3 <221875817+alrun3@users.noreply.github.com> Date: Fri, 1 Aug 2025 22:59:19 +0200 Subject: [PATCH] perf: skip `GameDataParser` if there are no subscribers --- W3GNET/Parsers/ReplayParser.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/W3GNET/Parsers/ReplayParser.cs b/W3GNET/Parsers/ReplayParser.cs index 1aacdaa..1111b08 100644 --- a/W3GNET/Parsers/ReplayParser.cs +++ b/W3GNET/Parsers/ReplayParser.cs @@ -46,7 +46,11 @@ public async Task Parse(Stream input) }; OnBasicReplayInformation?.Invoke(result); - await gameDataParser.Parse(metadataParserResult.gameData); + + if (OnGameDataBlock != null) + { + await gameDataParser.Parse(metadataParserResult.gameData); + } return result; }