diff options
author | Monroe Linden <monroe@lindenlab.com> | 2009-11-13 18:15:35 -0800 |
---|---|---|
committer | Monroe Linden <monroe@lindenlab.com> | 2009-11-13 18:15:35 -0800 |
commit | a58dd26b205d4e626028f1c7d27858d2ec927e41 (patch) | |
tree | cdf7cc7f766836cef4a6da2240052b3f603c8cb4 /indra/llplugin | |
parent | 6752853423f2f98894cbb32f54afc906e5a0e586 (diff) |
Tweaks to media priority calculation.
Enabled CPU limit setting by default (set to 100% of 1 CPU).
Lowered default limits on plugin priorities: 2 normal+, 4 low, 8 total.
Limit on total number of instances now only applies to inworld media -- media instances in the UI (such as the help browser and search) don't count toward the limit. UI media will still bump inworld media down from normal/low priority, though.
Several improvements to plugin manager debug code in the nearby media list.
Don't load unloaded instances that are at PRIORITY_SLIDESHOW or PRIORITY_HIDDEN (they don't get unloaded, they just won't be loaded unless they're at higher priority).
Added LLViewerMediaImpl::isPlayable(), which indicates whether an instance would be loaded if it were high enough in the priority list (taking into account autoplay and current load state). Priority algorithm now takes this into account.
Fixed a couple of issues with approximate texture interest calculation and its use in setting priorities.
Adjusted sleep times on low and normal priorities to be more friendly.
Diffstat (limited to 'indra/llplugin')
-rw-r--r-- | indra/llplugin/llpluginclassmedia.cpp | 4 | ||||
-rw-r--r-- | indra/llplugin/llpluginprocesschild.cpp | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 42d5ec49cd..c3d8a5aa23 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -593,10 +593,10 @@ void LLPluginClassMedia::setPriority(EPriority priority) mSleepTime = 1.0f; break; case PRIORITY_LOW: - mSleepTime = 1.0f / 50.0f; + mSleepTime = 1.0f / 25.0f; break; case PRIORITY_NORMAL: - mSleepTime = 1.0f / 100.0f; + mSleepTime = 1.0f / 50.0f; break; case PRIORITY_HIGH: mSleepTime = 1.0f / 100.0f; diff --git a/indra/llplugin/llpluginprocesschild.cpp b/indra/llplugin/llpluginprocesschild.cpp index 450dcb3c78..fc95136d9e 100644 --- a/indra/llplugin/llpluginprocesschild.cpp +++ b/indra/llplugin/llpluginprocesschild.cpp @@ -37,12 +37,13 @@ #include "llpluginmessageclasses.h" static const F32 HEARTBEAT_SECONDS = 1.0f; +static const F32 PLUGIN_IDLE_SECONDS = 1.0f / 100.0f; // Each call to idle will give the plugin this much time. LLPluginProcessChild::LLPluginProcessChild() { mInstance = NULL; mSocket = LLSocket::create(gAPRPoolp, LLSocket::STREAM_TCP); - mSleepTime = 1.0f / 100.0f; // default: send idle messages at 100Hz + mSleepTime = PLUGIN_IDLE_SECONDS; // default: send idle messages at 100Hz mCPUElapsed = 0.0f; } @@ -155,7 +156,7 @@ void LLPluginProcessChild::idle(void) { // Provide some time to the plugin LLPluginMessage message("base", "idle"); - message.setValueReal("time", mSleepTime); + message.setValueReal("time", PLUGIN_IDLE_SECONDS); sendMessageToPlugin(message); mInstance->idle(); |