From 4790f8576c868ac92b5f2c9e96e1f8629af09d4d Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Wed, 14 Oct 2009 19:23:44 -0700 Subject: * Replaced (possibly broken?) math for calculating the unix timestamp in MySQLAssetData with Utils.DateTimeToUnixTime() * Disabled UpdateAccessTime() function since it was only writing zeros anyways. This gave me a significant performance improvement for startup times and avatar logins in standalone mode * Load attachments asynchronously so avatars with lots of attachments don't have to race the timeout clock to login --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 6 +++--- OpenSim/Region/Framework/Scenes/Scene.cs | 2 +- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 0cb5682..c44c4c7 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -2402,11 +2402,11 @@ namespace OpenSim.Region.Framework.Scenes InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); item = InventoryService.GetItem(item); presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/); - IAvatarFactory ava = RequestModuleInterface(); - if (ava != null) + + if (m_AvatarFactory != null) { m_log.InfoFormat("[SCENE INVENTORY]: Saving avatar attachment. AgentID:{0} ItemID:{1} AttachmentPoint:{2}", remoteClient.AgentId, itemID, AttachmentPt); - ava.UpdateDatabase(remoteClient.AgentId, presence.Appearance); + m_AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); } } } diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 14e4534..d3d397d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2481,7 +2481,7 @@ namespace OpenSim.Region.Framework.Scenes if (aCircuit == null || aCircuit.child == false) { sp.IsChildAgent = false; - sp.RezAttachments(); + Util.FireAndForget(delegate(object o) { sp.RezAttachments(); }); } } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 15fb11f..2a06f9e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3841,6 +3841,9 @@ namespace OpenSim.Region.Framework.Scenes List attPoints = m_appearance.GetAttachedPoints(); foreach (int p in attPoints) { + if (m_isDeleted) + return; + UUID itemID = m_appearance.GetAttachedItem(p); UUID assetID = m_appearance.GetAttachedAsset(p); @@ -3866,9 +3869,7 @@ namespace OpenSim.Region.Framework.Scenes { m_log.ErrorFormat("[ATTACHMENT]: Unable to rez attachment: {0}", e.ToString()); } - } - } } } -- cgit v1.1