From 67fefdb5a0eafc5fe899b990b096d1d70ce9d4a8 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 30 Sep 2009 20:52:10 +0100 Subject: Remove predecode-j2k and it's assoaciated logic --- OpenSim/Region/Application/OpenSim.cs | 20 ---- OpenSim/Region/Framework/Scenes/SceneManager.cs | 122 ------------------------ 2 files changed, 142 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 10071a0..b23cdc3 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -306,10 +306,6 @@ namespace OpenSim "delete-region ", "Delete a region from disk", RunCommand); - m_console.Commands.AddCommand("region", false, "predecode-j2k", - "predecode-j2k []>", - "Precache assets,decode j2k layerdata", RunCommand); - m_console.Commands.AddCommand("region", false, "modules list", "modules list", "List modules", HandleModules); @@ -744,22 +740,6 @@ namespace OpenSim } break; - case "predecode-j2k": - if (cmdparams.Length > 0) - { - m_sceneManager.CacheJ2kDecode(Convert.ToInt32(cmdparams[0])); - } - else - { - m_sceneManager.CacheJ2kDecode(1); - } - break; - - case "link-region": - case "unlink-region": - case "link-mapping": - HGCommands.RunHGCommand(command, cmdparams, m_sceneManager.CurrentOrFirstScene); - break; } } diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs index 091a2d5..1843e2c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneManager.cs +++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs @@ -540,127 +540,5 @@ namespace OpenSim.Region.Framework.Scenes { m_localScenes.ForEach(action); } - - public void CacheJ2kDecode(int threads) - { - if (threads < 1) threads = 1; - - IJ2KDecoder m_decoder = m_localScenes[0].RequestModuleInterface(); - - List assetRequestList = new List(); - - #region AssetGathering! - foreach (Scene scene in m_localScenes) - { - List entitles = scene.GetEntities(); - foreach (EntityBase entity in entitles) - { - if (entity is SceneObjectGroup) - { - SceneObjectGroup sog = (SceneObjectGroup) entity; - foreach (SceneObjectPart part in sog.Children.Values) - { - if (part.Shape != null) - { - if (part.Shape.TextureEntry.Length > 0) - { - OpenMetaverse.Primitive.TextureEntry te = - new Primitive.TextureEntry(part.Shape.TextureEntry, 0, - part.Shape.TextureEntry.Length); - if (te.DefaultTexture != null) // this has been null for some reason... - { - if (te.DefaultTexture.TextureID != UUID.Zero) - assetRequestList.Add(te.DefaultTexture.TextureID); - } - for (int i=0; i arrvalus = new List(); - - //split into separate arrays - for (int j = 0; j < threads; j++) - { - List val = new List(); - - for (int k = j * entries_per_thread; k < ((j + 1) * entries_per_thread); k++) - { - if (k < arrAssetRequestList.Length) - { - val.Add(arrAssetRequestList[k]); - } - - } - arrvalus.Add(val.ToArray()); - } - - for (int l = 0; l < arrvalus.Count; l++) - { - DecodeThreadContents threadworkItem = new DecodeThreadContents(); - threadworkItem.sn = m_localScenes[0]; - threadworkItem.j2kdecode = m_decoder; - threadworkItem.arrassets = arrvalus[l]; - - System.Threading.Thread decodethread = - new System.Threading.Thread(new System.Threading.ParameterizedThreadStart(threadworkItem.run)); - - threadworkItem.SetThread(decodethread); - - decodethread.Priority = System.Threading.ThreadPriority.Lowest; - decodethread.Name = "J2kCacheDecodeThread_" + l + 1; - ThreadTracker.Add(decodethread); - decodethread.Start(); - - } - } - } - - public class DecodeThreadContents - { - public Scene sn; - public UUID[] arrassets; - public IJ2KDecoder j2kdecode; - private System.Threading.Thread thisthread; - - public void run(object o) - { - for (int i=0;i