diff options
| author | Rye <rye@alchemyviewer.org> | 2025-12-31 13:07:22 -0500 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-01-07 02:15:43 +0200 |
| commit | e440c0e47958ae9adeb775de6a4f033010b82414 (patch) | |
| tree | e9eaa3ca811501a012b22443fc8a37673a52044f /indra/llfilesystem/lldiskcache.cpp | |
| parent | 25dc8660efedecfd9f021142ac1e4ff3639e80d4 (diff) | |
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 <rye@alchemyviewer.org>
Diffstat (limited to 'indra/llfilesystem/lldiskcache.cpp')
| -rw-r--r-- | indra/llfilesystem/lldiskcache.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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() |
