Commit Graph

600 Commits (11013ad2956a87a5641ee2245fe81e5f3dfec268)

Author SHA1 Message Date
Melanie c4969d47d9 Merge branch 'master' into vehicles 2009-10-22 07:12:10 +01:00
John Hurliman 45dc4e0a54 * Added a sanity check to GetScriptAssemblies() and GetScriptStates() for the case where no scripting engine is enabled
* Added TokenBucket.cs to OpenSim, with some fixes for setting a more accurate MaxBurst value and getting a more accurate Content value (by Drip()ing each get)
2009-10-20 18:19:17 -07:00
John Hurliman 1833c69568 * Removed the unused m_agentUpdates collection and some extra work that was being done for AgentUpdate packets
* Start LLUDPClients unpaused (this variable is not being used yet)
2009-10-20 15:19:19 -07:00
John Hurliman edd393ff30 Reverting the deletion of files related to texture sending until we figure out exactly what is and isn't needed 2009-10-20 11:58:23 -07:00
John Hurliman 9a5e7222ce * Removing cruft left over from the conversion to the new texture sending and UDP code
* Changing the cache modules to only initialize the caches if they are actually enabled. Should save a bit of resources from unused cache systems
2009-10-20 10:33:23 -07:00
John Hurliman bd03cbd815 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim into prioritization 2009-10-19 15:19:37 -07:00
John Hurliman 142008121e * Change Util.FireAndForget to use ThreadPool.UnsafeQueueUserWorkItem(). This avoids .NET remoting and a managed->unmanaged->managed jump. Overall, a night and day performance difference
* Initialize the LLClientView prim full update queue to the number of prims in the scene for a big performance boost
* Reordered some comparisons on hot code paths for a minor speed boost
* Removed an unnecessary call to the expensive DateTime.Now function (if you *have* to get the current time as opposed to Environment.TickCount, always use DateTime.UtcNow)
* Don't fire the queue empty callback for the Resend category
* Run the outgoing packet handler thread loop for each client synchronously. It seems like more time was being spent doing the execution asynchronously, and it made deadlocks very difficult to track down
* Rewrote some expensive math in LandObject.cs
* Optimized EntityManager to only lock on operations that need locking, and use TryGetValue() where possible
* Only update the attachment database when an object is attached or detached
* Other small misc. performance improvements
2009-10-19 15:19:09 -07:00
Melanie ffd59868f5 Merge branch 'master' into vehicles 2009-10-19 21:58:51 +01:00
John Hurliman 233e16b99c * Rewrote the methods that build ObjectUpdate and ImprovedTerseObjectUpdate packets to fill in the data more accurately and avoid allocating memory that is immediately thrown away
* Changed the Send*Data structs in IClientAPI to use public readonly members instead of private members and getters
* Made Parallel.ProcessorCount public
* Started switching over packet building methods in LLClientView to use Util.StringToBytes[256/1024]() instead of Utils.StringToBytes()
* More cleanup of the ScenePresences vs. ClientManager nightmare
* ScenePresence.HandleAgentUpdate() will now time out and drop incoming AgentUpdate packets after three seconds. This fixes a deadlock on m_AgentUpdates that was blocking up the LLUDP server
2009-10-18 20:24:20 -07:00
Jeff Ames 0d29614ca1 Formatting cleanup. 2009-10-19 08:58:03 +09:00
John Hurliman fdb2a75ad3 Committing the second part of Jim Greensky @ Intel Lab's patch, re-prioritizing updates 2009-10-17 18:01:22 -07:00
John Hurliman 9c21d672d4 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim into prioritization 2009-10-16 18:32:12 -07:00
Teravus Ovares (Dan Olivares) 01051daaab * One more tweak to inform the user that they may not be able to move until relogging. 2009-10-16 21:24:08 -04:00
John Hurliman b813058635 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim into prioritization 2009-10-16 13:29:12 -07:00
Teravus Ovares (Dan Olivares) f5964347bd * fix previous commit 2009-10-16 16:25:48 -04:00
Teravus Ovares (Dan Olivares) ac31cb89d5 * Ensure that at least 20 frames run before letting avatar in. 2009-10-16 16:22:10 -04:00
John Hurliman 5a4fda9dc3 Updating OpenSim.ini.example with the section required to enable a useful prioritization scheme 2009-10-16 11:09:18 -07:00
John Hurliman 06354a093d Merge branch 'master' of ssh://opensimulator.org/var/git/opensim into prioritization 2009-10-16 10:09:19 -07:00
Teravus Ovares (Dan Olivares) 67afa9e633 * Make sure to unregister the OutOfBounds Physics event in RemoveFromPhysicalScene or we'll be leaking 2009-10-16 03:52:57 -04:00
Teravus Ovares (Dan Olivares) ac2f98b846 * A hacky attempt at resolving mantis #4260. I think ODE was unable to allocate memory, and therefore the unmanaged wrapper call fails or worse.. there's some unmanaged resource accounting in the ODEPlugin for ODECharacter that isn't being done properly now.
* The broken avatar may not be able to move, but it won't stop simulate from pressing on now.   And, the simulator will try to destroy the avatar's physics proxy and recreate it again...    but if this is what I think it is, it may not help.
2009-10-16 03:32:30 -04:00
John Hurliman 4b75353cbf Object update prioritization by Jim Greensky of Intel Labs, part one. This implements a simple distance prioritizer based on initial agent positions. Re-prioritizing and more advanced priority algorithms will follow soon 2009-10-15 16:35:27 -07:00
John Hurliman d44b50ee46 * Removed some of the redundant broadcast functions in Scene and SceneGraph so it is clear who/what the broadcast is going to each time
* Removed two redundant parameters from SceneObjectPart
* Changed some code in terse update sending that was meant to work with references to work with value types (since Vector3 and Quaternion are structs)
* Committing a preview of a new method for sending object updates efficiently (all commented out for now)
2009-10-15 15:25:02 -07:00
Melanie 642084c2a9 Merge branch 'master' into vehicles 2009-10-15 21:16:05 +01:00
Melanie 6deef7d0f3 Merge branch 'master' into vehicles 2009-10-15 21:14:13 +01:00
Teravus Ovares (Dan Olivares) 6d3d985511 * Request from lkalif to have the Sim send a coarselocationupdate for each avatar in the sim, including yourself.
* Apparently the LLClientView should have been doing this previously..      Also fixed the 'You' on the index block..   so the client doesn't display an extra green dot.
* Thanks lkalif for bringing it to our attention.
2009-10-15 02:01:29 -04:00
John Hurliman 4790f8576c * Replaced (possibly broken?) math for calculating the unix timestamp in MySQLAssetData with Utils.DateTimeToUnixTime()
* Disabled UpdateAccessTime() function since it was only writing zeros anyways. This gave me a significant performance improvement for startup times and avatar logins in standalone mode
* Load attachments asynchronously so avatars with lots of attachments don't have to race the timeout clock to login
2009-10-14 19:23:44 -07:00
Melanie 6bdd6ae0a0 Merge branch 'master' into htb-throttle 2009-10-14 23:31:38 +01:00
Diva Canto bea13e3709 Setting changeY in border crossing. 2009-10-14 11:01:46 -07:00
Melanie d83ace0d3b Merge branch 'master' into htb-throttle 2009-10-14 05:10:43 +01:00
Dan Lake 5976ac16b0 Optimized heartbeat by calling Update() only on updated objects.
During the heartbeat loop, Update() is called on every SceneObjectGroup which in turn checks if any SceneObjectPart has changed. For large regions (> 100k prims) this work consumes 20-30% of a CPU even though there are only a few objects updating each frame.

There is only one other reason to check every object on every frame, and that is the case where a script has registered the object with an "at target" listener. We can easily track when an object is registered or unregistered with an AtTarget, so this is not a reason to check every object every heartbeat.

In the attached patch, I have added a dictionary to the scene which tracks the objects which have At Targets. Each heartbeat, the AtTarget() function will be called on every object registered with a listener for that event. Also, I added a dictionary to SceneGraph which stores references to objects which have been queued for updates during the heartbeat. At each heartbeat, Update() is called only on the objects which have generated updates during that beat.
2009-10-13 19:32:59 -07:00
Teravus Ovares (Dan Olivares) 31a61bbeec * Fixes some prim crossings on megaregions with regions beyond the 512m mark
* There's a slight chance that this could cause a problem with regular prim crossings..   but hopefully not.     Revert if it does.
2009-10-13 22:03:53 -04:00
John Hurliman dc11643c00 * Consolidated adding / removing ClientManager IClientAPIs to two places in Scene
* Added some missing implementations of IClientAPI.RemoteEndPoint
* Added a ClientManager.Remove(UUID) overload
* Removed a reference to a missing project from prebuild.xml
2009-10-13 17:33:45 -07:00
John Hurliman 23a334b9f5 * Rewrote ClientManager to remove Lindenisms from OpenSim core, improve performance by removing locks, and replace LLUDPClientCollection
* Removed the confusing (and LL-specific) shutdowncircuit parameter from IClientAPI.Close()
* Updated the LLUDP code to only use ClientManager instead of trying to synchronize ClientManager and m_clients
* Remove clients asynchronously since it is a very slow operation (including a 2000ms sleep)
2009-10-13 14:50:03 -07:00
John Hurliman c893761319 * Unregister event handlers in LLUDPServer when a client logs out and disconnects
* Move ViewerEffect handling to Scene.PacketHandlers
* Removing the unused CloseAllAgents function
* Trimming ClientManager down. This class needs to be reworked to keep LLUDP circuit codes from intruding into the abstract OpenSim core code
2009-10-13 12:50:59 -07:00
Diva Canto 0cfbdf3894 Added this one file for the previous commit to work. 2009-10-12 17:01:03 -07:00
Diva Canto c0beeb929e * Fixes http://opensimulator.org/mantis/view.php?id=4225
* Fixes http://opensimulator.org/mantis/view.php?id=3959
* Allows for viewing inventory textures outside home grid
2009-10-12 17:00:01 -07:00
Melanie 170d2c4660 Merge branch 'master' into htb-throttle 2009-10-12 15:25:42 +01:00
Melanie 70553a979e Merge branch 'master' into vehicles 2009-10-12 15:12:15 +01:00
Melanie 50f509d600 Merge branch 'master' into vehicles 2009-10-12 15:11:01 +01:00
Diva Canto ef6aa444bf Fixed tree crossing. This will alleviate
http://opensimulator.org/mantis/view.php?id=4163
2009-10-11 13:46:19 -07:00
Melanie 5e6e31591c Merge branch 'master' into htb-throttle
This is hand-edited to not let master changes creep into here and may cause a
somewhat rocky merge to master later.
2009-10-10 10:26:47 +01:00
Teravus Ovares (Dan Olivares) 8271528b1f * comment out the velocity test, using updates every 500 ms as set in ScenePresence.AddToPhysicalScene.
* This causes time to be counted in ODECharacter and, when a collision occurs, the physics scene will report the collisions only if the the difference of last time it reported the collisions from now was more then the set ms.
* This is cool because the time accrues while collisions are not taking place and when they do take place again, you get an immediate update.
2009-10-10 04:01:36 -04:00
Teravus Ovares (Dan Olivares) 3f0dc88c46 Merge branch 'master' of ssh://MyConnection/var/git/opensim 2009-10-10 03:54:10 -04:00
Teravus Ovares (Dan Olivares) 4ffe936ba8 * Make ODECharacter respect the scene's requested collision update time
* Set the Scene collision update time to 500 ms
2009-10-10 03:53:53 -04:00
dahlia d7654c3bda Adjust velocity threshold for triggering flailing. Thanks to KittoFlora for researching this. 2009-10-10 00:26:43 -07:00
Teravus Ovares (Dan Olivares) 5f94889044 * Fix incorrect math on the Velocity check in PhysicsCollisionUpdate. This may reduce avatar flailing. 2009-10-10 01:49:06 -04:00
Teravus Ovares (Dan Olivares) 798bce592f * Move the 'On Collision Update Movement Animation' routine to above the 'm_invulnerable' test. It doesn't fix anything but it should really be there anyway. 2009-10-10 01:16:34 -04:00
John Hurliman 77e48a6725 Change the backup thread to run on a BackgroundWorker instead of a Thread. I don't have an explanation, but this seems to stop a slow but steady memory leak I was experiencing 2009-10-09 02:49:55 -07:00
Melanie f6b8bac0fa Merge branch 'master' into vehicles 2009-10-08 10:32:15 +01:00
Melanie a52f6c56b1 Merge branch 'master' into htb-throttle 2009-10-07 05:19:20 +01:00