* Move missing texture request forward so that we don't actually ask the AssetCache for it if we know it's missing.

0.6.0-stable
Justin Clarke Casey 2008-03-17 21:44:54 +00:00
parent 872184fa2a
commit bbddc0dbe7
1 changed files with 26 additions and 21 deletions

View File

@ -100,6 +100,23 @@ namespace OpenSim.Region.Environment.Modules
textureSender.UpdateRequest(e.DiscardLevel, e.PacketNumber); textureSender.UpdateRequest(e.DiscardLevel, e.PacketNumber);
} }
else else
{
// If we've already told the client we're missing the texture, then don't ask the
// asset server for it again - record the fact that it's missing instead.
if (missingTextureRequests.ContainsKey(e.RequestedAssetID))
{
int requests = missingTextureRequests[e.RequestedAssetID] + 1;
if (requests % 20 == 0)
{
m_log.WarnFormat(
"[USER TEXTURE DOWNLOAD SERVICE]: Received {0} requests for the missing texture {1} from client {2}",
requests, e.RequestedAssetID, m_client.AgentId);
}
missingTextureRequests[e.RequestedAssetID] = requests;
}
else
{ {
//m_log.DebugFormat("[USER TEXTURE DOWNLOAD]: Adding download stat {0}", e.RequestedAssetID); //m_log.DebugFormat("[USER TEXTURE DOWNLOAD]: Adding download stat {0}", e.RequestedAssetID);
m_scene.AddPendingDownloads(1); m_scene.AddPendingDownloads(1);
@ -112,6 +129,7 @@ namespace OpenSim.Region.Environment.Modules
} }
} }
} }
}
else else
{ {
lock (m_textureSenders) lock (m_textureSenders)
@ -159,19 +177,6 @@ namespace OpenSim.Region.Environment.Modules
EnqueueTextureSender(textureNotFoundSender); EnqueueTextureSender(textureNotFoundSender);
missingTextureRequests.Add(textureID, 1); missingTextureRequests.Add(textureID, 1);
} }
else
{
int requests = missingTextureRequests[textureID] + 1;
if (requests % 20 == 0)
{
m_log.WarnFormat(
"[USER TEXTURE DOWNLOAD SERVICE]: Received {0} requests for the missing texture {1} from client {2}",
requests, textureID, m_client.AgentId);
}
missingTextureRequests[textureID] = requests;
}
} }
else else
{ {