1. simon_linden
  2. viewer-rabbit

Commits

Richard Linden  committed 43e9a04

EXP-700 WIP SLPlugin(s) takes high CPU%
clamp maximum framerate of slplugin to 100Hz
also added assert to catch cases where we're requesting infinite framerate

  • Participants
  • Parent commits 7e1e71a
  • Branches default

Comments (0)

Files changed (2)

File indra/llplugin/llpluginprocesschild.cpp

View file
 			}
 			else if(message_name == "sleep_time")
 			{
-				mSleepTime = parsed.getValueReal("time");
+				mSleepTime = llmax(parsed.getValueReal("time"), 1.0 / 100.0); // clamp to maximum of 100Hz
 			}
 			else if(message_name == "crash")
 			{

File indra/llplugin/llpluginprocessparent.cpp

View file
 				}
 				
 				// Send initial sleep time
+				llassert_always(mSleepTime != 0.f);
 				setSleepTime(mSleepTime, true);			
 
 				setState(STATE_RUNNING);