diff options
author | Dave Parks <davep@lindenlab.com> | 2012-11-07 16:03:54 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-11-07 16:03:54 -0600 |
commit | a36b66bd145e99a8f597f1c7c3b48ca30bdd7029 (patch) | |
tree | 16975fa96600b25e8243fc5152998556370262fb /indra/newview | |
parent | 9ff687218af74000c7281e0579d17ef2930c6e33 (diff) |
MAINT-1815 Fix for excessive memory usage in Mayfair. Disable tcmalloc. Disable private memory pools. Make viewer large address aware on windows.
Reviewed by Kelly
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/CMakeLists.txt | 6 | ||||
-rw-r--r-- | indra/newview/app_settings/settings.xml | 2 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llappviewerwin32.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewertexture.cpp | 34 | ||||
-rw-r--r-- | indra/newview/llviewertexture.h | 1 |
6 files changed, 37 insertions, 10 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index a8a7e05fd5..f2e6f3265b 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1565,9 +1565,9 @@ if (WINDOWS) set_target_properties(${VIEWER_BINARY_NAME} PROPERTIES # *TODO -reenable this once we get server usage sorted out - LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS}" - LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO" - LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF" + LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS} /LARGEADDRESSAWARE" + LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO /LARGEADDRESSAWARE" + LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF /LARGEADDRESSAWARE" ) if(USE_PRECOMPILED_HEADERS) set_target_properties( diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 1bf773bb9e..46f2453726 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5755,7 +5755,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> + <integer>0</integer> </map> <key>MemoryPrivatePoolSize</key> <map> diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 4de80037ed..d354015b59 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -706,7 +706,7 @@ bool LLAppViewer::init() //set the max heap size. initMaxHeapSize() ; - LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")) ; + LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")*1024*1024) ; // write Google Breakpad minidump files to our log directory std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""); diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index e0ca1232b0..11790d562f 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -125,7 +125,7 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, #if WINDOWS_CRT_MEM_CHECKS && !INCLUDE_VLD _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); // dump memory leaks on exit -#elif 1 +#elif 0 // Experimental - enable the low fragmentation heap // This results in a 2-3x improvement in opening a new Inventory window (which uses a large numebr of allocations) // Note: This won't work when running from the debugger unless the _NO_DEBUG_HEAP environment variable is set to 1 diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 7f638a24bf..808781ea93 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -619,6 +619,7 @@ LLViewerTexture::~LLViewerTexture() void LLViewerTexture::init(bool firstinit) { mBoostLevel = LLViewerTexture::BOOST_NONE; + mSelectedTime = 0.f; mFullWidth = 0; mFullHeight = 0; @@ -674,11 +675,18 @@ void LLViewerTexture::setBoostLevel(S32 level) if(mBoostLevel != level) { mBoostLevel = level ; - if(mBoostLevel != LLViewerTexture::BOOST_NONE) + if(mBoostLevel != LLViewerTexture::BOOST_NONE && + mBoostLevel != LLViewerTexture::BOOST_SELECTED) { setNoDelete() ; } } + + if (mBoostLevel == LLViewerTexture::BOOST_SELECTED) + { + mSelectedTime = gFrameTimeSeconds; + } + } @@ -1865,13 +1873,31 @@ void LLViewerFetchedTexture::updateVirtualSize() for(U32 i = 0 ; i < mNumFaces ; i++) { LLFace* facep = mFaceList[i] ; - if(facep->getDrawable()->isRecentlyVisible()) + LLDrawable* drawable = facep->getDrawable(); + if (drawable) { - addTextureStats(facep->getVirtualSize()) ; - setAdditionalDecodePriority(facep->getImportanceToCamera()) ; + if(drawable->isRecentlyVisible()) + { + if (getBoostLevel() == LLViewerTexture::BOOST_NONE && + drawable->getVObj() && drawable->getVObj()->isSelected()) + { + setBoostLevel(LLViewerTexture::BOOST_SELECTED); + } + addTextureStats(facep->getVirtualSize()) ; + setAdditionalDecodePriority(facep->getImportanceToCamera()) ; + } } } + //reset whether or not a face was selected after 10 seconds + const F32 SELECTION_RESET_TIME = 10.f; + + if (getBoostLevel() == LLViewerTexture::BOOST_SELECTED && + gFrameTimeSeconds - mSelectedTime > SELECTION_RESET_TIME) + { + setBoostLevel(LLViewerTexture::BOOST_NONE); + } + if(mMaxVirtualSizeResetCounter > 0) { mMaxVirtualSizeResetCounter--; diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index f1105c3705..e08c9b0ed9 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -275,6 +275,7 @@ private: protected: LLUUID mID; S32 mBoostLevel; // enum describing priority level + F32 mSelectedTime; // time texture was last selected S32 mFullWidth; S32 mFullHeight; BOOL mUseMipMaps ; |