aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP (follow)
Commit message (Collapse)AuthorAgeFilesLines
* * Converts ClientManager.ForEach() (and as a result, Scene.ForEachClient()) ↵John Hurliman2009-10-272-4/+6
| | | | | | to use a non-blocking parallel method when operating in async mode * Minor code readability cleanup
* * Double the priority on avatar bake texture requests to get avatars rezzing ↵John Hurliman2009-10-261-4/+14
| | | | | | in faster than the surrounding scene * Adds duplicate tracking for SceneObjectParts and ScenePresences to avoid sending out duplicate ImprovedTerseObjectUpdate packets
* Removing the ClientManager reference from IScene and hiding it entirely ↵John Hurliman2009-10-261-7/+7
| | | | inside Scene as an implementation detail. This will reduce programming error and make it easier to refactor the avatar vs client vs presence mess later on
* * Switched all operations on the list of clients that could be either sync ↵John Hurliman2009-10-261-2/+2
| | | | | | | | or async to use Scene.ForEachClient() instead of referencing ClientManager directly * Added a new [Startup] config option called use_async_when_possible to signal how to run operations that could be either sync or async * Changed Scene.ForEachClient to respect use_async_when_possible * Fixing a potential deadlock in Parallel.ForEach by locking on a temporary object instead of the enumerator (which may be shared across multiple invocations on ForEach). Thank you diva
* ParcelObjectOwnersReplyPacket has null DataBlock when a client requests a ↵Dan Lake2009-10-261-0/+4
| | | | list of their prims in the region and none exist. Instead of leaving pack.Data null, this patch sets a new DataBlock[0];
* Changed UseCircuitCode handling to be synchronous or asynchronous depending ↵John Hurliman2009-10-261-10/+21
| | | | on the async_packet_handling config option, and added a debug log message when a UseCircuitCode packet is handled
* Removed an unnecessary lock in LLUDPClient.UpdateRTO() and ↵John Hurliman2009-10-261-30/+21
| | | | LLUDPClient.BackoffRTO()
* Changing Scene.ForEachClient to use the synchronous for loop instead of ↵John Hurliman2009-10-252-16/+42
| | | | | | | | | | Parallel. This is quite possibly the source of some deadlocking, and at the very least the synchronous version gives better stack traces * Lock the LLUDPClient RTO math * Add a helper function for backing off the RTO, and follow the optional advice in RFC 2988 to clear existing SRTT and RTTVAR values during a backoff * Removing the unused PrimitiveBaseShape.SculptImage parameter * Improved performance of SceneObjectPart instantiation * ZeroMesher now drops SculptData bytes like Meshmerizer, to allow the texture data to be GCed * Improved typecasting speed in MySQLLegacyRegionData.BuildShape() * Improved the instantiation of PrimitiveBaseShape
* * Unregister Mono.Addins event handlers in PluginLoader.Dispose() and always ↵John Hurliman2009-10-231-1/+5
| | | | | | | handle PluginLoader with the using pattern. This freed up 121,634,796 bytes on my system * Avoid allocating an Action<IClientAPI> object every round of the OutgoingPacketHandler * Removed unnecessary semi-colon endings from OpenSim.ini.example [InterestManagement] section
* Cleaning up OpenSim.ini.example for LLUDP. The [LLClient] section has been ↵John Hurliman2009-10-232-13/+28
| | | | removed and several new parameters have been added to [ClientStack.LindenUDP]
* Uncommented the resend log line so the previous commit can be seen in actionJohn Hurliman2009-10-231-1/+1
|
* * Changed the max RTO value to 60 seconds to comply with RFC 2988John Hurliman2009-10-232-1/+4
| | | | * Implemented section 5.5, exponential backoff of the RTO after a resend
* Commented out noisy debugging about resent packets (normal) and agents ↵John Hurliman2009-10-232-3/+3
| | | | setting throttles (normal)
* Experimental change to use an immutable array for iterating ScenePresences, ↵John Hurliman2009-10-231-71/+70
| | | | avoiding locking and copying the list each time it is accessed
* Implemented a Watchdog class. Do not manually create Thread objects anymore, ↵John Hurliman2009-10-221-8/+11
| | | | use Watchdog.StartThread(). While your thread is running call Watchdog.UpdateThread(). When it is shutting down call Watchdog.RemoveThread(). Most of the threads in OpenSim have been updated
* Add copyright header. Formatting cleanup.Jeff Ames2009-10-221-1/+1
|
* * Changed the misc. methods calling ThreadPool.UnsafeQueueUserWorkItem() to ↵John Hurliman2009-10-211-3/+3
| | | | | | Util.FireAndForget() * Changed Util.FireAndForget() to use any of five different methods set with async_call_method in the [Startup] section of OpenSim.ini. Look at the example config for possible values
* * Change the OnQueueEmpty signature to send the flags of the queues that are ↵John Hurliman2009-10-214-61/+108
| | | | | | | empty instead of firing once per empty queue * Change the OnQueueEmpty firing to use a minimum time until next fire instead of a sleep * Set OutgoingPacket.TickCount = 0 earlier to avoid extra resends when things are running slowly (inside a profiler, for example)
* * Clarified what FireQueueEmpty is doing with a MIN_CALLBACK_MS constant and ↵John Hurliman2009-10-214-18/+8
| | | | | | | upped it to 30ms * Removed the unused PacketSent() function * Switched UnackedPacketCollection from a SortedDictionary to a Dictionary now that the sorting is no longer needed. Big performance improvement for ResendUnacked()
* * FireQueueEmpty now checks if a measurable amount of time has passed, and ↵John Hurliman2009-10-213-38/+16
| | | | | | if not it sleeps for a small amount of time. This throttles OnQueueEmpty calls where there is no callback or the callback is doing very little work * Changed HandleQueueEmpty()'s Monitor.TryEnter() calls to locks. We want to take our time in this function and do all the work necessary, since returning too fast will induce a sleep anyways
* * Changed the timing calculations for sending resends/acks/pings from ↵John Hurliman2009-10-213-41/+63
| | | | | | per-client back to per-scene * Testing a fix from Jim to make the cpu usage fix cleaner
* Testing out a hack to identify the source of the high cpu usageJohn Hurliman2009-10-211-0/+3
|
* Removing the Sleep(0) call from the OutgoingPacketHandlerJohn Hurliman2009-10-211-6/+3
|
* * Handle UseCircuitCode packets asynchronously. Adding an agent to a scene ↵John Hurliman2009-10-213-13/+49
| | | | | | | | can take several seconds, and was blocking up packet handling in the meantime * Clamp retransmission timeout values between three and 10 seconds * Log outgoing time for a packet right after it is sent instead of well before * Loop through the entire UnackedPacketCollection when looking for expired packets
* * Replaced the UnackedPacketCollection with a lockless implementation. The ↵John Hurliman2009-10-214-208/+126
| | | | | | | tiny amount of time spent in the locks turned into a lot of time when the rest of the LLUDP implementation went lockless * Changed the timer tracking numbers for each client to not have "memory". It will no longer queue up calls to functions like ResendUnacked * Reverted Jim's WaitHandle code. Although it was technically more correct, it exhibited the exact same behavior as the old code but spent more cycles. The 20ms has been replaced with the minimum amount of time before a token bucket could receive a drip, and an else { sleep(0); } was added to make sure the outgoing packet handler always yields at least a minimum amount
* Fixed the way OnQueueEmpty is called to prevent simultaneous calls for the ↵John Hurliman2009-10-211-7/+7
| | | | same category
* Committing Jim's optimization to replace the 20ms sleep in outgoing packet ↵John Hurliman2009-10-214-50/+121
| | | | handling with an interruptible wait handle
* * Added a sanity check to GetScriptAssemblies() and GetScriptStates() for ↵John Hurliman2009-10-204-0/+219
| | | | | | 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)
* * Removed the unused m_agentUpdates collection and some extra work that was ↵John Hurliman2009-10-201-1/+1
| | | | | | being done for AgentUpdate packets * Start LLUDPClients unpaused (this variable is not being used yet)
* * Removed the throttle speed optimizations to see if it brings stability backJohn Hurliman2009-10-202-72/+69
| | | | * Changed the outgoing packet handler to use a real function instead of a closure and to track time on a per-client basis instead of a global basis
* Added try/catches in the outgoing packet handler to match the one in the ↵John Hurliman2009-10-201-45/+59
| | | | incoming packet handler
* Fixing position/rotation/collisionplane in ObjectUpdate packets for avatarsJohn Hurliman2009-10-201-6/+8
|
* Reverting the deletion of files related to texture sending until we figure ↵John Hurliman2009-10-201-0/+2
| | | | out exactly what is and isn't needed
* * Optimized sending of terrain dataJohn Hurliman2009-10-192-155/+180
| | | | | * Send terrain data in a spiral pattern instead of a typewriter pattern (placeholder until terrain data becomes part of the interest list management) * Added a debug line when resent packets are being sent
* * Removed OpenSim.Data.NHibernateJohn Hurliman2009-10-191-3/+3
| | | | * Replaced calls to ThreadPool.QueueUserWorkItem() with ThreadPool.UnsafeQueueUserWorkItem() since OpenSim does not use Code Access Security sandboxing
* * Change Util.FireAndForget to use ThreadPool.UnsafeQueueUserWorkItem(). ↵John Hurliman2009-10-194-56/+62
| | | | | | | | | | | | | | 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
* * Rewrote the methods that build ObjectUpdate and ImprovedTerseObjectUpdate ↵John Hurliman2009-10-182-648/+371
| | | | | | | | | | 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
* * Process the avatar terse update priority queue as soon as an update for ↵John Hurliman2009-10-181-40/+39
| | | | | | | our own avatar is ready to send * Reduce the scope of the locks when processing the update queues * Reuse the ImprovedTerseObjectUpdate.RegionData block
* * Big performance increase in loading prims from the region database with MySQLJohn Hurliman2009-10-182-25/+50
| | | | | | * Handle the AgentFOV packet * Bypass queuing and throttles for ping checks to make ping times more closely match network latency * Only track reliable bytes in LLUDPCLient.BytesSinceLastACK
* * Committing Nini.dll with the patch from #3773 appliedJohn Hurliman2009-10-171-1/+1
| | | | * Fixing a log message typo
* Committing the second part of Jim Greensky @ Intel Lab's patch, ↵John Hurliman2009-10-171-17/+90
| | | | re-prioritizing updates
* Wrapped the contents of the IncomingPacketHandler loop in a try/catch statementJohn Hurliman2009-10-171-2/+9
|
* Changing avatar movement updates to the Task throttle category until we get ↵John Hurliman2009-10-161-5/+6
| | | | finer grained prioritization of avatars vs. prims
* Prevent oversized packets from crashing the LLUDP server. It will now print ↵John Hurliman2009-10-161-5/+20
| | | | a friendly error message and drop the packet
* * Simplified the prioritization packet creation code to reduce CPU usage and ↵John Hurliman2009-10-163-95/+35
| | | | | | increase throughput. Apologies to Jim for hacking on your code while it's only halfway done, I'll take responsibility for the manual merge * Changed LLUDP to use its own MTU value of 1400 instead of the 1200 value pulled from the currently shipped libomv
* * Changing the "clean dropped attachments" MySQL command to a using ↵John Hurliman2009-10-161-1/+2
| | | | | | statement inside a try/catch. This statement times out for me very frequently * More verbose logging when zerocoding fails on an outbound packet
* * Change appearance packets from State to Task. This will hopefully fix the ↵John Hurliman2009-10-163-37/+46
| | | | | | cloud issues * Changed the throttling logic to obey the requested client bandwidth limit but also share bandwidth between some of the categories to improve throughput on high prim or heavily trafficked regions
* Merge branch 'master' of ssh://opensimulator.org/var/git/opensim into ↵John Hurliman2009-10-161-7/+27
|\ | | | | | | prioritization
| * Thank you, Fly man, for plumbing the AvatarInterestsUpdate packetMelanie2009-10-161-5/+22
| |
| * * Request from lkalif to have the Sim send a coarselocationupdate for each ↵Teravus Ovares (Dan Olivares)2009-10-151-2/+5
| | | | | | | | | | | | | | 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.