aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs18
1 files changed, 15 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index e1ca6cd..62b25d0 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -54,8 +54,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
54 public int DebugLevel { get; set; } 54 public int DebugLevel { get; set; }
55 55
56 /// <summary> 56 /// <summary>
57 /// Period to sleep per 100 prims in order to avoid CPU spikes when an avatar with many attachments logs in 57 /// Period to sleep per 100 prims in order to avoid CPU spikes when an avatar with many attachments logs in/changes
58 /// or many avatars with a medium levels of attachments login simultaneously. 58 /// outfit or many avatars with a medium levels of attachments login/change outfit simultaneously.
59 /// </summary> 59 /// </summary>
60 /// <remarks> 60 /// <remarks>
61 /// A value of 0 will apply no pause. The pause is specified in milliseconds. 61 /// A value of 0 will apply no pause. The pause is specified in milliseconds.
@@ -1094,7 +1094,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
1094 } 1094 }
1095 1095
1096 if (tainted) 1096 if (tainted)
1097 objatt.HasGroupChanged = true; 1097 objatt.HasGroupChanged = true;
1098
1099 if (ThrottlePer100PrimsRezzed > 0)
1100 {
1101 int throttleMs = (int)Math.Round((float)objatt.PrimCount / 100 * ThrottlePer100PrimsRezzed);
1102
1103 if (DebugLevel > 0)
1104 m_log.DebugFormat(
1105 "[ATTACHMENTS MODULE]: Throttling by {0}ms after rez of {1} with {2} prims for attachment to {3} on point {4} in {5}",
1106 throttleMs, objatt.Name, objatt.PrimCount, sp.Name, attachmentPt, m_scene.Name);
1107
1108 Thread.Sleep(throttleMs);
1109 }
1098 1110
1099 return objatt; 1111 return objatt;
1100 } 1112 }