!= UUID.Zero is slow

This commit is contained in:
UbitUmarov
2022-01-09 02:28:51 +00:00
parent 7e0fc95c3a
commit da928d6099
78 changed files with 254 additions and 263 deletions

View File

@@ -87,7 +87,7 @@ namespace OpenSim.Groups
if (group == null)
return UUID.Zero;
if (group.GroupID != UUID.Zero)
if (!group.GroupID.IsZero())
{
m_Cache.AddOrUpdate("group-" + group.GroupID.ToString(), group, GROUPS_CACHE_TIMEOUT);
m_Cache.Remove("memberships-" + RequestingAgentID.ToString());
@@ -101,7 +101,7 @@ namespace OpenSim.Groups
//ExtendedGroupRecord group = m_GroupsService.UpdateGroup(RequestingAgentID, groupID, charter, showInList, insigniaID, membershipFee, openEnrollment, allowPublish, maturePublish);
ExtendedGroupRecord group = d();
if (group != null && group.GroupID != UUID.Zero)
if (group != null && !group.GroupID.IsZero())
m_Cache.AddOrUpdate("group-" + group.GroupID.ToString(), group, GROUPS_CACHE_TIMEOUT);
return true;
@@ -115,10 +115,10 @@ namespace OpenSim.Groups
object group = null;
bool firstCall = false;
string cacheKey = "group-";
if (GroupID != UUID.Zero)
cacheKey += GroupID.ToString();
else
if (GroupID.IsZero())
cacheKey += GroupName;
else
cacheKey += GroupID.ToString();
//m_log.DebugFormat("[XXX]: GetGroupRecord {0}", cacheKey);