mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
== UUID.Zero is slow
This commit is contained in:
@@ -723,7 +723,7 @@ namespace OpenSim.Data.MySQL
|
||||
|
||||
if (parentFolder.Count >= 1) // No result means parent folder does not exist
|
||||
{
|
||||
if (parentFolder[0].ParentID == UUID.Zero) // We are querying the root folder
|
||||
if (parentFolder[0].ParentID.IsZero()) // We are querying the root folder
|
||||
{
|
||||
/* Get all of the agent's folders from the database, put them in a list and return it */
|
||||
using (MySqlCommand result = new MySqlCommand("SELECT * FROM inventoryfolders WHERE agentID = ?uuid", dbcon))
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace OpenSim.Data.MySQL
|
||||
if (pd.Length == 0)
|
||||
return false;
|
||||
|
||||
if (regionID == UUID.Zero)
|
||||
if (regionID.IsZero())
|
||||
return false;
|
||||
|
||||
using (MySqlCommand cmd = new MySqlCommand())
|
||||
|
||||
@@ -378,7 +378,7 @@ namespace OpenSim.Data.MySQL
|
||||
// Create all of the SOGs from the root prims first
|
||||
foreach (SceneObjectPart prim in prims.Values)
|
||||
{
|
||||
if (prim.ParentUUID == UUID.Zero)
|
||||
if (prim.ParentUUID.IsZero())
|
||||
{
|
||||
objects[prim.UUID] = new SceneObjectGroup(prim);
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace OpenSim.Data.PGSQL
|
||||
/// <returns>A list of folder objects</returns>
|
||||
public List<InventoryFolderBase> getUserRootFolders(UUID user)
|
||||
{
|
||||
if (user == UUID.Zero)
|
||||
if (user.IsZero())
|
||||
return new List<InventoryFolderBase>();
|
||||
|
||||
return getInventoryFolders(UUID.Zero, user);
|
||||
@@ -197,7 +197,7 @@ namespace OpenSim.Data.PGSQL
|
||||
|
||||
List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
|
||||
|
||||
if (parentID == UUID.Zero)
|
||||
if (parentID.IsZero())
|
||||
return folders;
|
||||
|
||||
string sql = "SELECT * FROM inventoryfolders WHERE \"parentFolderID\" = :parentID";
|
||||
@@ -702,7 +702,7 @@ namespace OpenSim.Data.PGSQL
|
||||
using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
|
||||
using (NpgsqlCommand command = new NpgsqlCommand(sql, conn))
|
||||
{
|
||||
if (user == UUID.Zero)
|
||||
if (user.IsZero())
|
||||
{
|
||||
command.Parameters.Add(database.CreateParameter("uuid", "%"));
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace OpenSim.Data.PGSQL
|
||||
if (pd.Length == 0)
|
||||
return false;
|
||||
|
||||
if (regionID == UUID.Zero)
|
||||
if (regionID.IsZero())
|
||||
return false;
|
||||
|
||||
using (NpgsqlConnection conn = new NpgsqlConnection(m_ConnectionString))
|
||||
|
||||
Reference in New Issue
Block a user