From 76206543e83661bbf04ee046b10b27736c589c81 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 25 Jan 2009 04:34:00 +0000 Subject: * Adds console command, 'predecode-j2k ' to load all of the texture assets from the scene and decode the j2k layer data to cache. The work is split between the number of threads you specify. A good number of threads value is the number of cores on your machine minus 1. * Increases the number of ImageDataPackets we send per PriorityQueue pop and tweak it so that the number of packets is ( (2 * decode level) + 1 ) * 2, and (((2 * (5-decode level)) + 1) * 2). The first one sends more data for low quality textures, the second one sends more data for high quality textures. --- OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs b/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs index 58c4e04..3b21c85 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs @@ -230,12 +230,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP else if (!process.data.J2KDecodeWaiting) { // Send more data at a time for higher discard levels - for (int i = 0; i < (2*(5 - process.data.DiscardLevel) + 1)*2; i++) + bool done = false; + for (int i = 0; i < (2*(process.data.DiscardLevel) + 1)*2; i++) if (!process.data.SendPacket(m_client)) { + done = true; pq[h] -= (500000*i); break; } + if (!done) + { + for (int i = 0; i < (2 * (5- process.data.DiscardLevel) + 1) * 2; i++) + if (!process.data.SendPacket(m_client)) + { + done = true; + pq[h] -= (500000 * i); + break; + } + } } // If the priority is less then -4 billion, the client has forgotten about it, pop it off if (pq[h] < -400000000) -- cgit v1.1