OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OpenSim.Region.Framework.Scenes.AsyncInventorySender Class Reference

Send FetchInventoryReply information to clients asynchronously on a single thread rather than asynchronously via multiple threads. More...

Collaboration diagram for OpenSim.Region.Framework.Scenes.AsyncInventorySender:
Collaboration graph
[legend]

Public Member Functions

 AsyncInventorySender (Scene scene)
 
void HandleFetchInventory (IClientAPI remoteClient, UUID itemID, UUID ownerID)
 Handle a fetch inventory request from the client More...
 

Protected Member Functions

void ProcessQueue ()
 Process the queue of fetches More...
 

Protected Attributes

Scene m_scene
 
volatile bool m_processing
 Signal whether a queue is currently being processed or not. More...
 

Detailed Description

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.

Definition at line 71 of file AsyncInventorySender.cs.

Constructor & Destructor Documentation

OpenSim.Region.Framework.Scenes.AsyncInventorySender.AsyncInventorySender ( Scene  scene)
inline

Definition at line 87 of file AsyncInventorySender.cs.

Member Function Documentation

void OpenSim.Region.Framework.Scenes.AsyncInventorySender.HandleFetchInventory ( IClientAPI  remoteClient,
UUID  itemID,
UUID  ownerID 
)
inline

Handle a fetch inventory request from the client

Parameters
remoteClient
itemID
ownerID

Definition at line 99 of file AsyncInventorySender.cs.

void OpenSim.Region.Framework.Scenes.AsyncInventorySender.ProcessQueue ( )
inlineprotected

Process the queue of fetches

Definition at line 119 of file AsyncInventorySender.cs.

Member Data Documentation

volatile bool OpenSim.Region.Framework.Scenes.AsyncInventorySender.m_processing
protected

Signal whether a queue is currently being processed or not.

Definition at line 85 of file AsyncInventorySender.cs.

Scene OpenSim.Region.Framework.Scenes.AsyncInventorySender.m_scene
protected

Definition at line 75 of file AsyncInventorySender.cs.


The documentation for this class was generated from the following file: