From e440c0e47958ae9adeb775de6a4f033010b82414 Mon Sep 17 00:00:00 2001 From: Rye Date: Wed, 31 Dec 2025 13:07:22 -0500 Subject: Reduce temporary allocations and repeated utf8->utf16 in LLTextureCache with new LLFile IO code Add non-allocating to_chars and to_wchars string creation functions to LLUUID Signed-off-by: Rye --- indra/llfilesystem/lldiskcache.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/llfilesystem/lldiskcache.cpp') diff --git a/indra/llfilesystem/lldiskcache.cpp b/indra/llfilesystem/lldiskcache.cpp index c75df16b7d..3430bec925 100644 --- a/indra/llfilesystem/lldiskcache.cpp +++ b/indra/llfilesystem/lldiskcache.cpp @@ -210,7 +210,9 @@ void LLDiskCache::purge() const std::string LLDiskCache::metaDataToFilepath(const LLUUID& id, LLAssetType::EType at) { - return llformat("%s%s%s_%s_0.asset", sCacheDir.c_str(), gDirUtilp->getDirDelimiter().c_str(), CACHE_FILENAME_PREFIX.c_str(), id.asString().c_str()); + char uuid_str[UUID_STR_LENGTH]{}; + id.to_chars(uuid_str); + return llformat("%s%s%s_%s_0.asset", sCacheDir.c_str(), gDirUtilp->getDirDelimiter().c_str(), CACHE_FILENAME_PREFIX.c_str(), uuid_str); } const std::string LLDiskCache::getCacheInfo() -- cgit v1.3