Texture Cache

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

Disk storage format

The header consists of two files

8 byte header:

	struct EntriesInfo
	{
		F32 mVersion;
		U32 mEntries;
	};
  • Version 1.0: Array of 24 byte entries
	struct Entry
	{
		LLUUID mID; // 128 bits
		S32 mSize; // total size of image if known (NOT size cached)
		U32 mTime; // seconds since 1/1/1970
	};
  • Version 1.2: Array of 28 byte entries
	struct Entry
	{
		LLUUID mID; // 16 bytes
		S32 mImageSize; // total size of image if known
		S32 mBodySize; // size of body file in body cache
		U32 mTime; // seconds since 1/1/1970
	};

Array of 600 byte entries (first 600 bytes of .j2c file)

The main "body" cache consists of an entries file and 16 subdirectories

Array of 24 byte entries

	struct EntriesInfo
	{
		LLUUID mID; // 128 bits
		S32 mSize; // size of texture body stored on disk
		U32 mTime; // unused TODO: create separate structure without this entry
	};

Body of the texture, i.e. all of the texture minus the header

Analysis

(so far:)

In the discussion of the texture cache has, it is apparent that there are two separate issues involved. Beyond the view of the texture cache, there is the method to which to determine how long a texture is stored in the cache and there is medium format of the textures being stored. At this time, the format of the medium is still under discussion. However, there is significant data to move to a new system for the method to determine the storage time.

Discussion about improvements

Main Article: SLDEV Discussion - Texture Cache Plan of Attack

The texture cache is a hot topic for optimization. Current ideas/subjects discussed from the mailing list include:


Please use the Talk page to continue discussion.

Related articles: Image System, VFS