Fix texture fast cache ignoring its time limit constraint

meow-7.2.2
Ansariel 2025-06-02 23:29:53 +02:00
parent cf52d0c95a
commit a525d89977
1 changed files with 7 additions and 1 deletions

View File

@ -1498,6 +1498,10 @@ F32 LLViewerTextureList::updateImagesLoadingFastCache(F32 max_time)
// <FS:Ansariel> Fast cache stats
sNumFastCacheReads++;
// </FS:Ansariel>
// <FS:Ansariel> Fix fast cache
if (timer.getElapsedTimeF32() > max_time)
break;
// </FS:Ansariel>
}
mFastCacheList.erase(mFastCacheList.begin(), enditer);
return timer.getElapsedTimeF32();
@ -1609,7 +1613,9 @@ void LLViewerTextureList::decodeAllImages(F32 max_time)
LLTimer timer;
//loading from fast cache
updateImagesLoadingFastCache(max_time);
// <FS:Ansariel> Fix fast cache
//updateImagesLoadingFastCache(max_time);
max_time -= updateImagesLoadingFastCache(max_time);
// Update texture stats and priorities
std::vector<LLPointer<LLViewerFetchedTexture> > image_list;