diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2010-08-18 15:32:40 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2010-08-18 15:32:40 -0600 |
commit | 116382fdf78ca578a74c30a162208033fd021124 (patch) | |
tree | 3518d4d2ddf7515e7f46f8d7bf5cd76905f346c5 /indra/newview | |
parent | 104aec161e6675ed54b80f64766dea0555f7d175 (diff) |
fixed for EXT-8963: investigate if Advanced > Run Multiple Threads should be on.
Removed "Run Multiple Threads" from the menu because we are not using it.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 41 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 12 |
3 files changed, 15 insertions, 49 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2130713d50..51ed26505e 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8295,17 +8295,6 @@ <key>Value</key> <real>1.0</real> </map> - <key>RunMultipleThreads</key> - <map> - <key>Comment</key> - <string>If TRUE keep background threads active during render</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>0</integer> - </map> <key>SafeMode</key> <map> <key>Comment</key> diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 58b651ec39..d6ecb2f168 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1108,8 +1108,7 @@ bool LLAppViewer::mainLoop() { LLMemType mt_sleep(LLMemType::MTYPE_SLEEP); LLFastTimer t2(FTM_SLEEP); - bool run_multiple_threads = gSavedSettings.getBOOL("RunMultipleThreads"); - + // yield some time to the os based on command line option if(mYieldTime >= 0) { @@ -1147,9 +1146,7 @@ bool LLAppViewer::mainLoop() } static const F64 FRAME_SLOW_THRESHOLD = 0.5; //2 frames per seconds - const F64 min_frame_time = 0.0; //(.0333 - .0010); // max video frame rate = 30 fps - const F64 min_idle_time = 0.0; //(.0010); // min idle time = 1 ms - const F64 max_idle_time = run_multiple_threads ? min_idle_time : llmin(.005*10.0*gFrameTimeSeconds, 0.005); // 5 ms a second + const F64 max_idle_time = llmin(.005*10.0*gFrameTimeSeconds, 0.005); // 5 ms a second idleTimer.reset(); bool is_slow = (frameTimer.getElapsedTimeF64() > FRAME_SLOW_THRESHOLD) ; S32 total_work_pending = 0; @@ -1187,34 +1184,24 @@ bool LLAppViewer::mainLoop() total_work_pending += work_pending ; total_io_pending += io_pending ; - F64 frame_time = frameTimer.getElapsedTimeF64(); - F64 idle_time = idleTimer.getElapsedTimeF64(); - if (frame_time >= min_frame_time && - idle_time >= min_idle_time && - (!work_pending || idle_time >= max_idle_time)) + + if (!work_pending || idleTimer.getElapsedTimeF64() >= max_idle_time) { break; } } - // Prevent the worker threads from running while rendering. - // if (LLThread::processorCount()==1) //pause() should only be required when on a single processor client... - if (run_multiple_threads == FALSE) + if(!total_work_pending) //pause texture fetching threads if nothing to process. { - //LLFastTimer ftm(FTM_PAUSE_THREADS); //not necessary. - - if(!total_work_pending) //pause texture fetching threads if nothing to process. - { - LLAppViewer::getTextureCache()->pause(); - LLAppViewer::getImageDecodeThread()->pause(); - LLAppViewer::getTextureFetch()->pause(); - } - if(!total_io_pending) //pause file threads if nothing to process. - { - LLVFSThread::sLocal->pause(); - LLLFSThread::sLocal->pause(); - } - } + LLAppViewer::getTextureCache()->pause(); + LLAppViewer::getImageDecodeThread()->pause(); + LLAppViewer::getTextureFetch()->pause(); + } + if(!total_io_pending) //pause file threads if nothing to process. + { + LLVFSThread::sLocal->pause(); + LLLFSThread::sLocal->pause(); + } if ((LLStartUp::getStartupState() >= STATE_CLEANUP) && (frameTimer.getElapsedTimeF64() > FRAME_STALL_THRESHOLD)) diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 63ff7047b4..2f6ecd8a34 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1393,17 +1393,7 @@ function="Advanced.ToggleFeature" parameter="flexible" /> </menu_item_check> - </menu> - <menu_item_check - label="Run Multiple Threads" - name="Run Multiple Threads"> - <menu_item_check.on_check - function="CheckControl" - parameter="RunMultipleThreads" /> - <menu_item_check.on_click - function="ToggleControl" - parameter="RunMultipleThreads" /> - </menu_item_check> + </menu> <menu_item_check label="Use Plugin Read Thread" name="Use Plugin Read Thread"> |