diff options
author | Tom Grimshaw | 2010-05-12 07:14:06 -0700 |
---|---|---|
committer | Tom Grimshaw | 2010-05-12 07:14:06 -0700 |
commit | 98bd3e1f3498600e9299252723a8365ce8fd77fd (patch) | |
tree | 768059c1d9dbf4f5c72955e6444fa3123881b76b /OpenSim/Region/CoreModules/Avatar | |
parent | Spin the AddNewClient process off into a new thread to avoid locking up the L... (diff) | |
download | opensim-SC-98bd3e1f3498600e9299252723a8365ce8fd77fd.zip opensim-SC-98bd3e1f3498600e9299252723a8365ce8fd77fd.tar.gz opensim-SC-98bd3e1f3498600e9299252723a8365ce8fd77fd.tar.bz2 opensim-SC-98bd3e1f3498600e9299252723a8365ce8fd77fd.tar.xz |
Don't convert UUID -> ToString for every friend (Minor optimisation based on profiler feedback)
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 5dc9c44..5339dee 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | |||
@@ -201,9 +201,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
201 | 201 | ||
202 | UserFriendData data = m_Friends[principalID]; | 202 | UserFriendData data = m_Friends[principalID]; |
203 | 203 | ||
204 | string searchFor = friendID.ToString(); | ||
204 | foreach (FriendInfo fi in data.Friends) | 205 | foreach (FriendInfo fi in data.Friends) |
205 | { | 206 | { |
206 | if (fi.Friend == friendID.ToString()) | 207 | if (fi.Friend == searchFor) |
207 | return (uint)fi.TheirFlags; | 208 | return (uint)fi.TheirFlags; |
208 | } | 209 | } |
209 | return 0; | 210 | return 0; |