C# Class OpenSim.Region.Framework.Scenes.AsyncInventorySender

Send FetchInventoryReply information to clients asynchronously on a single thread rather than asynchronously via multiple threads.
If the main root inventory is right-clicked on a version 1 viewer for a user with a large inventory, a very very large number of FetchInventory requests are sent to the simulator. Each is handled on a separate thread by the IClientAPI, but the sheer number of requests overwhelms the number of threads available and ends up freezing the inbound packet handling. This class makes the first FetchInventory packet thread process the queue. If new requests come in while it is processing, then the subsequent threads just add the requests and leave it to the original thread to process them. This might slow down outbound packets but these are limited by the IClientAPI outbound queues anyway. It might be possible to ignore FetchInventory requests altogether, particularly as they are redundant wrt to FetchInventoryDescendents requests, but this would require more investigation.
ファイルを表示 Open project: francogrid/sim Class Usage Examples

Protected Properties

Property Type Description
m_processing bool
m_scene Scene

Public Methods

Method Description
AsyncInventorySender ( Scene scene ) : System
HandleFetchInventory ( IClientAPI remoteClient, UUID itemID, UUID ownerID ) : void

Handle a fetch inventory request from the client

Protected Methods

Method Description
ProcessQueue ( ) : void

Process the queue of fetches

Method Details

AsyncInventorySender() public method

public AsyncInventorySender ( Scene scene ) : System
scene Scene
return System

HandleFetchInventory() public method

Handle a fetch inventory request from the client
public HandleFetchInventory ( IClientAPI remoteClient, UUID itemID, UUID ownerID ) : void
remoteClient IClientAPI
itemID UUID
ownerID UUID
return void

ProcessQueue() protected method

Process the queue of fetches
protected ProcessQueue ( ) : void
return void

Property Details

m_processing protected_oe property

Signal whether a queue is currently being processed or not.
protected bool m_processing
return bool

m_scene protected_oe property

protected Scene,OpenSim.Region.Framework.Scenes m_scene
return Scene