summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnsariel Hiller <Ansariel@users.noreply.github.com>2025-06-10 11:53:06 +0200
committerGitHub <noreply@github.com>2025-06-10 12:53:06 +0300
commit4c529c85d16e65e6da416c59f40f0b5265bb7c08 (patch)
treea42d5944a0bfd25d294e96fcaf22cf0fa61ca7b4
parent2c35cddddd3c68cb97a5e1ed29dcd40c13e3e7ed (diff)
Fix fast cache ignoring its time constraint (#4237)
-rw-r--r--indra/newview/llviewertexturelist.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 2f42c4e238..6f79532ec3 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -1197,6 +1197,8 @@ F32 LLViewerTextureList::updateImagesLoadingFastCache(F32 max_time)
enditer = iter;
LLViewerFetchedTexture *imagep = *curiter;
imagep->loadFromFastCache();
+ if (timer.getElapsedTimeF32() > max_time)
+ break;
}
mFastCacheList.erase(mFastCacheList.begin(), enditer);
return timer.getElapsedTimeF32();
@@ -1308,7 +1310,7 @@ void LLViewerTextureList::decodeAllImages(F32 max_time)
LLTimer timer;
//loading from fast cache
- updateImagesLoadingFastCache(max_time);
+ max_time -= updateImagesLoadingFastCache(max_time);
// Update texture stats and priorities
std::vector<LLPointer<LLViewerFetchedTexture> > image_list;