Difference between revisions of "Texture Cache"
Jump to navigation
Jump to search
Rob Linden (talk | contribs) |
Rob Linden (talk | contribs) |
||
Line 1: | Line 1: | ||
'''LLTextureCache''' is a worker thread interface class used for reading and writing texture data to the local disk cache (part of the [[Image System]]) | |||
== Current design == | |||
* There are two different disk caches used by the Second Life Viewer: | |||
** The static texture cache | |||
*** Located in the Second Life/skins/textures directory | |||
*** This is a read-only cache which contains common textures shipped with the Viewer | |||
** The general texture cache | |||
*** Stored in a 'textures' subdirectory in the cache directory, specified in the preferences | |||
*** This is a two tiered read/write cache | |||
**** A list of all files in the cace is stored in texture.entries | |||
**** The header for each image (enough to identify the size and load the first mip level) is stored in texture.cache | |||
**** The body (minus the header) for a limited (by the cache size) number of entries is stored in textures/[0-9a-f]/textureid | |||
* Requests to read or write to the cache are processed in the priority given | |||
* The results are given through a [[Responder]] class when they are ready | |||
== Discussion about improvements == | |||
The texture cache is a hot topic for optimization. Current ideas/subjects discussed from the mailing list include: | The texture cache is a hot topic for optimization. Current ideas/subjects discussed from the mailing list include: | ||
*Multi-level cache for uncompressed and compressed textures | *Multi-level cache for uncompressed and compressed textures |
Revision as of 18:29, 24 March 2007
LLTextureCache is a worker thread interface class used for reading and writing texture data to the local disk cache (part of the Image System)
Current design
- There are two different disk caches used by the Second Life Viewer:
- The static texture cache
- Located in the Second Life/skins/textures directory
- This is a read-only cache which contains common textures shipped with the Viewer
- The general texture cache
- Stored in a 'textures' subdirectory in the cache directory, specified in the preferences
- This is a two tiered read/write cache
- A list of all files in the cace is stored in texture.entries
- The header for each image (enough to identify the size and load the first mip level) is stored in texture.cache
- The body (minus the header) for a limited (by the cache size) number of entries is stored in textures/[0-9a-f]/textureid
- The static texture cache
- Requests to read or write to the cache are processed in the priority given
- The results are given through a Responder class when they are ready
Discussion about improvements
The texture cache is a hot topic for optimization. Current ideas/subjects discussed from the mailing list include:
- Multi-level cache for uncompressed and compressed textures
Example Cache Levels:
- Memory
- Uncompressed Disk
- Compressed Disk
- Low Rez Compressed
- Network
A flexible policy architecture would be able to discard, cache, retrieve, and migrate texture data from one level to the next as is appropiate with an external XML file to facilitate fine tuning of policy parameters.
- Fixed block size cache to store images of any size that is a power of 2
- Reformatted textures, being changed from jpeg2000 to TGA (with or without RLE), BMP, GIF, or downsampled
- Storage:
- Filesystem
- Database
- Network
- Memory mapped
- Quality of cached images
- System Requirements
- Minimal
- Optimal
- Surveys
- Core(s)
Please use the Talk page to continue discussion.
Related articles: Image System, VFS