diff options
author | Diva Canto | 2013-07-17 11:19:36 -0700 |
---|---|---|
committer | Diva Canto | 2013-07-17 11:19:36 -0700 |
commit | e46459ef21e1ee5ceaeca70365a7c881d33b09ce (patch) | |
tree | 519428c7148d85f6d8b114710928fb41f2edbbfd /OpenSim/Region/ClientStack/Linden | |
parent | Removed the MapItems thread. Redirected the map items requests to the service... (diff) | |
download | opensim-SC-e46459ef21e1ee5ceaeca70365a7c881d33b09ce.zip opensim-SC-e46459ef21e1ee5ceaeca70365a7c881d33b09ce.tar.gz opensim-SC-e46459ef21e1ee5ceaeca70365a7c881d33b09ce.tar.bz2 opensim-SC-e46459ef21e1ee5ceaeca70365a7c881d33b09ce.tar.xz |
Cleared up much confusion in PollServiceRequestManager. Here's the history:
When Melanie added the web fetch inventory throttle to core, she made the long poll requests (EQs) effectively be handled on an active loop. All those requests, if they existed, were being constantly dequeued, checked for events (which most often they didn't have), and requeued again. This was an active loop thread on a 100ms cycle!
This fixes the issue. Now the inventory requests, if they aren't ready to be served, are placed directly back in the queue, but the long poll requests aren't placed there until there are events ready to be sent or timeout has been reached.
This puts the LongPollServiceWatcherThread back to 1sec cycle, as it was before.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 1835a72..f0445ff 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs | |||
@@ -364,8 +364,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
364 | 364 | ||
365 | caps.RegisterPollHandler( | 365 | caps.RegisterPollHandler( |
366 | "EventQueueGet", | 366 | "EventQueueGet", |
367 | new PollServiceEventArgs( | 367 | new PollServiceEventArgs(null, GenerateEqgCapPath(eventQueueGetUUID), HasEvents, GetEvents, NoEvents, agentID, 40000)); |
368 | null, GenerateEqgCapPath(eventQueueGetUUID), HasEvents, GetEvents, NoEvents, agentID, 40000)); | ||
369 | 368 | ||
370 | Random rnd = new Random(Environment.TickCount); | 369 | Random rnd = new Random(Environment.TickCount); |
371 | lock (m_ids) | 370 | lock (m_ids) |
@@ -383,7 +382,10 @@ namespace OpenSim.Region.ClientStack.Linden | |||
383 | Queue<OSD> queue = GetQueue(agentID); | 382 | Queue<OSD> queue = GetQueue(agentID); |
384 | if (queue != null) | 383 | if (queue != null) |
385 | lock (queue) | 384 | lock (queue) |
385 | { | ||
386 | //m_log.WarnFormat("POLLED FOR EVENTS BY {0} in {1} -- {2}", agentID, m_scene.RegionInfo.RegionName, queue.Count); | ||
386 | return queue.Count > 0; | 387 | return queue.Count > 0; |
388 | } | ||
387 | 389 | ||
388 | return false; | 390 | return false; |
389 | } | 391 | } |
@@ -406,7 +408,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
406 | public Hashtable GetEvents(UUID requestID, UUID pAgentId) | 408 | public Hashtable GetEvents(UUID requestID, UUID pAgentId) |
407 | { | 409 | { |
408 | if (DebugLevel >= 2) | 410 | if (DebugLevel >= 2) |
409 | m_log.DebugFormat("POLLED FOR EQ MESSAGES BY {0} in {1}", pAgentId, m_scene.RegionInfo.RegionName); | 411 | m_log.WarnFormat("POLLED FOR EQ MESSAGES BY {0} in {1}", pAgentId, m_scene.RegionInfo.RegionName); |
410 | 412 | ||
411 | Queue<OSD> queue = TryGetQueue(pAgentId); | 413 | Queue<OSD> queue = TryGetQueue(pAgentId); |
412 | OSD element; | 414 | OSD element; |