From 6d02d5ebaa4ff6322217e98b0a2bf74824a74c46 Mon Sep 17 00:00:00 2001 From: RoosterDragon Date: Wed, 23 Dec 2015 20:19:22 +0000 Subject: [PATCH] Remove some unneeded PerfSamples. --- OpenRA.Game/Network/Connection.cs | 7 ------- OpenRA.Game/WorldUtils.cs | 11 ++++------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/OpenRA.Game/Network/Connection.cs b/OpenRA.Game/Network/Connection.cs index 28c9317d05..8a6d02c155 100644 --- a/OpenRA.Game/Network/Connection.cs +++ b/OpenRA.Game/Network/Connection.cs @@ -14,7 +14,6 @@ using System.IO; using System.Net.Sockets; using System.Threading; using OpenRA.Server; -using OpenRA.Support; namespace OpenRA.Network { @@ -212,12 +211,6 @@ namespace OpenRA.Network if (socket != null) socket.Client.Close(); - using (new PerfSample("Thread.Join")) - { - if (!t.Join(1000)) - return; - } - base.Dispose(disposing); } diff --git a/OpenRA.Game/WorldUtils.cs b/OpenRA.Game/WorldUtils.cs index b015fd35ae..c86e4d7919 100644 --- a/OpenRA.Game/WorldUtils.cs +++ b/OpenRA.Game/WorldUtils.cs @@ -32,13 +32,10 @@ namespace OpenRA public static IEnumerable FindActorsInCircle(this World world, WPos origin, WDist r) { - using (new PerfSample("FindUnitsInCircle")) - { - // Target ranges are calculated in 2D, so ignore height differences - var vec = new WVec(r, r, WDist.Zero); - return world.ActorMap.ActorsInBox(origin - vec, origin + vec).Where( - a => (a.CenterPosition - origin).HorizontalLengthSquared <= r.LengthSquared); - } + // Target ranges are calculated in 2D, so ignore height differences + var vec = new WVec(r, r, WDist.Zero); + return world.ActorMap.ActorsInBox(origin - vec, origin + vec).Where( + a => (a.CenterPosition - origin).HorizontalLengthSquared <= r.LengthSquared); } public static void DoTimed(this IEnumerable e, Action a, string text)