[sldev] Texture Cache update

Steve steve at lindenlab.com
Thu May 24 18:47:26 PDT 2007


First off, apologies to anyone who has been making incremental changes 
to LLTextureCache, but I discovered a problem with the LRU algorithm and 
in the process of fixing it I have significantly rewritten much of the 
code pertaining to the Entry lists. The significant changes will include:

* cache/texture.entries and cache/textures/texture.entries have been 
combined into a single file
* the new format for Entry is : UUID, S32 imagesize, S32 bodysize, U32 time
* Entry.mTime for a texture is updated any time the texture is read or 
written, improving the LRU significantly

These changes will hopefully show up in the next month.

If you have found specific bugs or improvements that you have tested and 
verified, feel free to email them to me directly and I will make sure 
that they are addressed while I am working on the code.

For anyone working on a complete replacement for LLTextureCache (which I 
would happily encourage - I think that a solution using an object based 
file system could offer a significant improvement), I have not touched 
the interface so you should be unaffected by these changes.

Two comments regarding the discussion of storing the textures uncompressed:
* For the first 600 bytes, the decompression time is so small I suspect 
it will not have a significant effect on performance, but I could be wrong
* For the rest of the texture, I haven't tried it mostly due to the 
complexity of the task. If anyone has tried it successfully and has any 
numbers I would be curious to know what the results are.

-Steve



More information about the SLDev mailing list