More on mantis #7567. Two things:
- Increase the inventory cache timeout to 20 secs, so that the items will still be there when they are needed by the sim for rezzing - Before rezzing attachs, make a call to GetMultipleItems so to fetch them all at the same timefsassets
parent
cc22d81b4d
commit
96f0c6f074
|
@ -304,6 +304,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||||
m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing any attachments for {0} from simulator-side", sp.Name);
|
m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing any attachments for {0} from simulator-side", sp.Name);
|
||||||
|
|
||||||
List<AvatarAttachment> attachments = sp.Appearance.GetAttachments();
|
List<AvatarAttachment> attachments = sp.Appearance.GetAttachments();
|
||||||
|
|
||||||
|
// Let's get all items at once, so they get cached
|
||||||
|
UUID[] items = new UUID[attachments.Count];
|
||||||
|
int i = 0;
|
||||||
|
foreach (AvatarAttachment attach in attachments)
|
||||||
|
items[i++] = attach.ItemID;
|
||||||
|
m_scene.InventoryService.GetMultipleItems(sp.UUID, items);
|
||||||
|
|
||||||
foreach (AvatarAttachment attach in attachments)
|
foreach (AvatarAttachment attach in attachments)
|
||||||
{
|
{
|
||||||
uint attachmentPt = (uint)attach.AttachPoint;
|
uint attachmentPt = (uint)attach.AttachPoint;
|
||||||
|
|
|
@ -62,7 +62,7 @@ namespace OpenSim.Services.Connectors
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
private int m_requestTimeoutSecs = -1;
|
private int m_requestTimeoutSecs = -1;
|
||||||
|
|
||||||
private const double CACHE_EXPIRATION_SECONDS = 8.0;
|
private const double CACHE_EXPIRATION_SECONDS = 20.0;
|
||||||
private static ExpiringCache<UUID, InventoryItemBase> m_ItemCache = new ExpiringCache<UUID,InventoryItemBase>();
|
private static ExpiringCache<UUID, InventoryItemBase> m_ItemCache = new ExpiringCache<UUID,InventoryItemBase>();
|
||||||
|
|
||||||
public XInventoryServicesConnector()
|
public XInventoryServicesConnector()
|
||||||
|
@ -244,7 +244,7 @@ namespace OpenSim.Services.Connectors
|
||||||
public virtual InventoryCollection[] GetMultipleFoldersContent(UUID principalID, UUID[] folderIDs)
|
public virtual InventoryCollection[] GetMultipleFoldersContent(UUID principalID, UUID[] folderIDs)
|
||||||
{
|
{
|
||||||
InventoryCollection[] inventoryArr = new InventoryCollection[folderIDs.Length];
|
InventoryCollection[] inventoryArr = new InventoryCollection[folderIDs.Length];
|
||||||
//m_log.DebugFormat("[XXX]: In GetMultipleFoldersContent {0}", folderIDs.Length);
|
// m_log.DebugFormat("[XXX]: In GetMultipleFoldersContent {0}", String.Join(",", folderIDs));
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Dictionary<string, object> resultSet = MakeRequest("GETMULTIPLEFOLDERSCONTENT",
|
Dictionary<string, object> resultSet = MakeRequest("GETMULTIPLEFOLDERSCONTENT",
|
||||||
|
@ -544,6 +544,8 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
public virtual InventoryItemBase[] GetMultipleItems(UUID principalID, UUID[] itemIDs)
|
public virtual InventoryItemBase[] GetMultipleItems(UUID principalID, UUID[] itemIDs)
|
||||||
{
|
{
|
||||||
|
//m_log.DebugFormat("[XXX]: In GetMultipleItems {0}", String.Join(",", itemIDs));
|
||||||
|
|
||||||
InventoryItemBase[] itemArr = new InventoryItemBase[itemIDs.Length];
|
InventoryItemBase[] itemArr = new InventoryItemBase[itemIDs.Length];
|
||||||
// Try to get them from the cache
|
// Try to get them from the cache
|
||||||
List<UUID> pending = new List<UUID>();
|
List<UUID> pending = new List<UUID>();
|
||||||
|
|
Loading…
Reference in New Issue