[Opensim-dev] Proposal: Slowly making less of the Scene.Update() loop synchronous

Justin Clark-Casey jjustincc at googlemail.com
Fri Sep 10 00:27:27 UTC 2010


Whilst bug hunting today, I had reason to dive into the Scene.Update() loop.  This is called many times per second and 
is in charge of updating the entire scene (moving avatars in response to client input, sending queued object updates to 
the client stack, etc.).  The time taken by this loop increases as the number objects and avatars in the scene increase.

There's quite a lot of code hanging off this loop that looks like it could be carried out asynchronously instead.  This 
particularly applies to some of the stuff being invoked via EventManager rather than called directly.

If the amount of synchronous code here could be reduced then this could improve scene performance and reduce instances 
where delays in the called code temporarily freeze the update loop.  These problems can be very hard to track down.

Unless there are any countervailing technical arguments, I'd like to start slowly looking at this over the long term. 
This might go so far as making some loop-triggered EventManager events asynchronous rather than synchronous.  I know 
there is a fair amount of code that does depend on synchronous execution so any changes will be done slowly and carefully.

Regards,

-- 
Justin Clark-Casey (justincc)
http://justincc.org
http://twitter.com/justincc



More information about the Opensim-dev mailing list