aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-03-17 21:44:54 +0000
committerJustin Clarke Casey2008-03-17 21:44:54 +0000
commitbbddc0dbe7553baebb13d1e1fd06a529d7fbaaa0 (patch)
treeb89a8175f85e253cb3a485bfd332d115493bf835
parent* Inserting code to prepare to fix trash emptying and the edit texture invent... (diff)
downloadopensim-SC-bbddc0dbe7553baebb13d1e1fd06a529d7fbaaa0.zip
opensim-SC-bbddc0dbe7553baebb13d1e1fd06a529d7fbaaa0.tar.gz
opensim-SC-bbddc0dbe7553baebb13d1e1fd06a529d7fbaaa0.tar.bz2
opensim-SC-bbddc0dbe7553baebb13d1e1fd06a529d7fbaaa0.tar.xz
* Move missing texture request forward so that we don't actually ask the AssetCache for it if we know it's missing.
-rw-r--r--OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs47
1 files changed, 26 insertions, 21 deletions
diff --git a/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs b/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs
index 6eaf321..e86e6ac 100644
--- a/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs
+++ b/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs
@@ -101,14 +101,32 @@ namespace OpenSim.Region.Environment.Modules
101 } 101 }
102 else 102 else
103 { 103 {
104 //m_log.DebugFormat("[USER TEXTURE DOWNLOAD]: Adding download stat {0}", e.RequestedAssetID); 104 // If we've already told the client we're missing the texture, then don't ask the
105 m_scene.AddPendingDownloads(1); 105 // asset server for it again - record the fact that it's missing instead.
106 106 if (missingTextureRequests.ContainsKey(e.RequestedAssetID))
107 TextureSender requestHandler = 107 {
108 new TextureSender(m_client, e.DiscardLevel, e.PacketNumber); 108 int requests = missingTextureRequests[e.RequestedAssetID] + 1;
109 m_textureSenders.Add(e.RequestedAssetID, requestHandler); 109
110 110 if (requests % 20 == 0)
111 m_scene.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback, true); 111 {
112 m_log.WarnFormat(
113 "[USER TEXTURE DOWNLOAD SERVICE]: Received {0} requests for the missing texture {1} from client {2}",
114 requests, e.RequestedAssetID, m_client.AgentId);
115 }
116
117 missingTextureRequests[e.RequestedAssetID] = requests;
118 }
119 else
120 {
121 //m_log.DebugFormat("[USER TEXTURE DOWNLOAD]: Adding download stat {0}", e.RequestedAssetID);
122 m_scene.AddPendingDownloads(1);
123
124 TextureSender requestHandler =
125 new TextureSender(m_client, e.DiscardLevel, e.PacketNumber);
126 m_textureSenders.Add(e.RequestedAssetID, requestHandler);
127
128 m_scene.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback, true);
129 }
112 } 130 }
113 } 131 }
114 } 132 }
@@ -159,19 +177,6 @@ namespace OpenSim.Region.Environment.Modules
159 EnqueueTextureSender(textureNotFoundSender); 177 EnqueueTextureSender(textureNotFoundSender);
160 missingTextureRequests.Add(textureID, 1); 178 missingTextureRequests.Add(textureID, 1);
161 } 179 }
162 else
163 {
164 int requests = missingTextureRequests[textureID] + 1;
165
166 if (requests % 20 == 0)
167 {
168 m_log.WarnFormat(
169 "[USER TEXTURE DOWNLOAD SERVICE]: Received {0} requests for the missing texture {1} from client {2}",
170 requests, textureID, m_client.AgentId);
171 }
172
173 missingTextureRequests[textureID] = requests;
174 }
175 } 180 }
176 else 181 else
177 { 182 {