* Adds console command, 'predecode-j2k <number of threads>' 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.
This commit is contained in:
Teravus Ovares
2009-01-25 04:34:00 +00:00
parent 676b7c1073
commit 76206543e8
4 changed files with 153 additions and 2 deletions

View File

@@ -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)