aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-11-25Label all threadpool calls being made in core OpenSimulator. This is to add ↵Justin Clark-Casey (justincc)2-5/+10
problem diagnosis. "show threadpool calls" now also returns named (labelled), anonymous (unlabelled) and total call stats.
2014-11-25Add "wearables check" console commandJustin Clark-Casey (justincc)1-64/+158
This checks that all the wearable assets and any assets for a given logged in avatar exist in the asset service
2014-11-25minor: Correct letter accidentally added to copyright notice on top of ↵Justin Clark-Casey (justincc)1-1/+1
Scene.cs (almost five years ago!)
2014-11-25In Scene.AddNewAgent(), avoid a situation where an exception can result in a ↵Justin Clark-Casey (justincc)1-11/+23
client being added to the manager without IClientAPI.SceneAgent being set. This is done by adjusting the order of code so that SceneAgent will always be set before adding the client. Various parts of the code (rightly) assume that a a client registered to the manager will always have a SceneAgent set no matter what.
2014-11-25If JobEngine is active, then use it to copy/rez attachments for an avatar ↵Justin Clark-Casey (justincc)1-22/+62
entering the scene that isn't initially logging on. This will execute tasks consecutively rather than concurrently. This has two aims 1) Reduce initial teleport failures when a foreign Hypergrid user enters a region by not holding up the teleport for attachment rez (this can be particularly costly when HG gets all assets in the object graph. 2) Reduce server load that may impact other simulator activities. This complements existing JobEngine options that perform initial login attachment rez and appearance send in consecutive tasks.
2014-11-25refactor: consistently put all test classes in the OpenSim.Tests.Common ↵Justin Clark-Casey (justincc)25-25/+0
package rather than some in OpenSim.Tests.Common.Mock the separate mock package was not useful and was just another using line to always add
2014-11-25Eliminate a few unnecessary calculations in the maintenance loop.Justin Clark-Casey (justincc)1-7/+17
Also uses wait event instead of sleep for periodicity control.
2014-11-25Fix recent minor regression where the default frame time wasn't being set if ↵Justin Clark-Casey (justincc)1-2/+1
there was no startup config section. Caused some regression tests to fail.
2014-11-25Improve frame time stability by taking a few unnecessary repeated ↵Justin Clark-Casey (justincc)2-21/+42
calculations out of the main scene loop. Also uses a wait event to sleep rather than a Thread.Sleep to allow the loop to be interrupted in a more controlled manner when necessary.
2014-11-25Set ThreadPriority on main scene thread to highest.Justin Clark-Casey (justincc)1-0/+1
This will only have an effect on Windows systems or mono with the (not recommended) mono-3.2.8 debug patch https://gist.github.com/justincc/31e52218d098529b4696 applied
2014-11-25Temporarily add root agent rez attachments work to job engine if it is ↵Justin Clark-Casey (justincc)1-4/+8
running rather than as a fire and forget. Experiment to see if serializing attachment rez and send initial data jobs improves other parts of sim performance.
2014-11-25Add experimental job engine to see if queueing some existing async work ↵Justin Clark-Casey (justincc)1-1/+1
during root agent entry to a region improves perf rather than always attempting to execute everything concurrently Job engine is controlled via "debug jobengine start|stop|status". Can only currently be enabled and disabled dynamically at runtime. Currently only applies to code sending initial region data (objects, other avatar data) to a client.
2014-11-19refactor: capitalize SOP.moveToTarget() and stopMoveToTarget() in accordance ↵Justin Clark-Casey2-4/+4
with code guidelines and the rest of the methods.
2014-11-19If calling llStopMoveToTarget() on an in-world prim, don't send an ↵Justin Clark-Casey1-2/+1
unnecessary object update if the prim was not moving to target. This involves making PhysicsActor.PIDActive get as well as set. On physics components that don't implement this (all characters and some phys engines) we return false.
2014-11-19Remove SOP.StopMoveToTarget scheduled update which is now being done in ↵Justin Clark-Casey1-3/+0
SOG.stopMoveToTarget() as of last commit 67e568
2014-11-19If llStopMoveToTarget() is called on an attachment, then stop the avatar if ↵Justin Clark-Casey1-5/+19
it was moving to target. Same behaviour as on Linden Lab grid. Will probably also address http://opensimulator.org/mantis/view.php?id=7369 by not generating spurious object updates when llStopMoveToTarget() is called in attachments where the avatar is not moving.
2014-11-11Fix issue where llRemoteLoadScriptPin() would treat 0 (the default) as a ↵Justin Clark-Casey1-8/+12
valid set pin in a destination prim rather than the unset no pin state Adds regression test for this case.
2014-10-16Fix transferring inventory from prims to agent inventoryMelanie Thielker1-6/+11
2014-10-04Add LSL transaction_result event.Justin Clark-Casey (justincc)1-0/+1
This is cinderblocks' transaction_result.diff from http://opensimulator.org/mantis/view.php?id=7329 but I have used lsl.parser.cs and lsl.lexer.cs files generated directly from opensim-libs rather than those supplied in the patch. I also added scriptEvents.transaction_reuslt. The required parser/lexer generation file changes were made in commit d564f28 in the opensim-libs repo. Thanks!
2014-10-02Do not add attachments to the region scene object backup list.Justin Clark-Casey (justincc)1-2/+2
Attachment persistence is not handled in this way and this just results in a load of busy work until a check in each SOG terminates a backup check for attachments anyway.
2014-10-02Set appearance refresh to false by default.Justin Clark-Casey (justincc)1-1/+1
This setting was originally added some time ago to deal with issues where appearance was not received properly by all users. However, it does not scale well with large numbers of agents. Disabling to see if the original problem has abated or whether this will have to be tackled in another way.
2014-09-27Move expired objects cleaning trigger to the maintenance thread of a region ↵Justin Clark-Casey (justincc)1-20/+23
rather than it's main scene loop. [Startup] default setting UpdateTempCleaningEveryNFrames becomes UpdateTempCleaningEveryNSeconds. Default becomes 180s instead of effective 182s (which would also vary with any changes in frame time or extra long frames)
2014-09-26Make "generate map" console command also trigger upload to maptiles as well ↵Justin Clark-Casey (justincc)1-0/+37
as asset generation without performing tile generation twice.
2014-09-24Remove an unnecessary check at the bottom of Scene.CloseAgent()Justin Clark-Casey (justincc)1-7/+2
At this point sp != null so no check required.
2014-09-23Modifications to previous IAR commits to bring them more inline with ↵AliciaRaven1-5/+5
existing OpenSim code conventions. Also include new IAR save switch in console help print out.
2014-09-23Add an event callback for loading IAR files. The callback for creating them ↵AliciaRaven1-3/+24
already existed but not for loading. This is of interest for use by region modules. Also includes reporting numbers of items saved and items filtered to the completed log printout.
2014-09-23Change existing IAR save to use UUID for its callback reference instead of ↵AliciaRaven1-3/+4
Guid. This is for uniformity as discussed on IRC.
2014-09-17This fixes the Scene thread renaming issueBlueWall1-1/+0
2014-09-17Undo "Revert "Small changes to threading to send thread names to unmanaged ↵BlueWall1-1/+3
threads. Needs Mono 3.6+ to see thread names in utilities like top -H . Some formatting of the thread name to fin in the 16 byte limit on Linux. Please test on Windows to see if the work has any adverse effects."" Fix for break in next commit This reverts commit 376fab140227e92dbd841436509a97b87c9e7792.
2014-09-17Changes to be committed: modified: ↵Edward1-0/+15
OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs modified: OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs This solves mantis bug# 5005: llRegionSay script does not trigger ChatFromWorld event. This was solved by adding World.SimChat() command to the llRegionSay() function (per suggestion of DrCuriosity). Additionally this fixes llRegionSayTo() which was also not functioning by adding a World.SimChat() command and adding a new SimChatToAgent() overrided function to Scene.PacketHandlers.cs This is the second patch revision. Corrections made to the position of World.SimChat() and removal of tabs per suggestion by justincc.
2014-09-17Revert "Small changes to threading to send thread names to unmanaged ↵BlueWall1-3/+1
threads. Needs Mono 3.6+ to see thread names in utilities like top -H . Some formatting of the thread name to fin in the 16 byte limit on Linux. Please test on Windows to see if the work has any adverse effects." This reverts commit af286d5fcb688e8b64202b6deca4f249e9a2b6b8. Issue with Jenkins builds
2014-09-17Small changes to threading to send thread names to unmanaged threads. Needs ↵BlueWall1-1/+3
Mono 3.6+ to see thread names in utilities like top -H . Some formatting of the thread name to fin in the 16 byte limit on Linux. Please test on Windows to see if the work has any adverse effects.
2014-09-12Fix issues where setting llSetTextureAnim(FALSE... did not work properly).Justin Clark-Casey (justincc)1-11/+20
I ended up amalgamating patches from http://opensimulator.org/mantis/view.php?id=7313 and http://opensimulator.org/mantis/view.php?id=7318 Thanks a lot to both bobshaffer2 and cinderblocks.
2014-09-11Fix regression from recent a02dae5 where stand positions are no longer ↵Justin Clark-Casey (justincc)1-3/+2
correct when a sit target is specified. Adjusts stand position using just avatar position relative to the root prim instead. Fixes http://opensimulator.org/mantis/view.php?id=7315 and preserves previous fix for http://opensimulator.org/mantis/view.php?id=7299
2014-09-05For monitoring purposes, start non-timeout tasks (which do not currently use ↵Justin Clark-Casey (justincc)2-13/+10
a threadpool) via Watchdog.RunInThread() rather than Util.RunThreadNoTimeout() The functionality is the same but this allow us to monitor such tasks via "show threads" and abort them for test purposes, etc. Also extends thread names to provide more info (e.g. SendInitialDataToClient says what client the task is for).
2014-09-03Add [EntityTransfer] AllowAvatarCrossing setting to determine whether ↵Justin Clark-Casey (justincc)2-1/+19
avatars are allowed to cross regions at all. Defaults to true. For test purposes.
2014-09-02Fix recent regression from 473c5594 where camera started to judder on moving ↵Justin Clark-Casey (justincc)1-15/+25
vehicles. Other parts of OpenSimulator are relying on SP.Velocity == 0 for vehicles. So add and use SP.GetWorldVelocity() instead when we need vehicle velocity, along the same lines as existing SP.GetWorldRotation()
2014-08-30As per the LL grid, if an avatar is sitting then return it's velocity ↵Justin Clark-Casey (justincc)1-0/+5
relative to the region rather than relative to its seat. Resolves http://opensimulator.org/mantis/view.php?id=7175
2014-08-30Fix issue where moving a seated avatar would not adjust their subsequent ↵Justin Clark-Casey (justincc)1-1/+1
stand position. Addresses http://opensimulator.org/mantis/view.php?id=7299
2014-08-29Implement STATUS_BLOCK_GRAB_OBJECT in llSetStatus()/llGetStatus() and ↵Justin Clark-Casey (justincc)3-20/+17
correct effect of STATUS_BLOCK_GRAB As per http://wiki.secondlife.com/wiki/LlSetStatus Setting STATUS_BLOCK_GRAB_OBJECT prevents or allows move of a physical linkset by grab on any prim. Setting STATUS_BLOCK_GRAB prevents or allows move of a physical linkset by grab on a particular prim. Previously, setting STATUS_BLOCK_GRAB would prevent drag via all prims of the linkset.
2014-08-29Ignore whitespace when reading serialized XML objects.Justin Clark-Casey (justincc)4-188/+192
This was previously effectively being done by XmlDocument in the multiple passes through the XML. This change tells XmlReader to ignore whitespace. This also means changing arguments to use XmlReader instead of XmlTextReader (a descendent of XmlReader) directly. XmlReader.Create() has been the recommend way to create XML readers since .NET 2.0 as per MS SDK and is the only way to specific ignore whitespace settings.
2014-08-28minor: Eliminate more unnecessary code copying individual parameters for ↵Justin Clark-Casey (justincc)1-17/+19
Vector3 copying in Scene - this is not necessary as Vector3 is a value type
2014-08-28On code section that rezzes single objects and attachments, reduce CPU use ↵Justin Clark-Casey (justincc)3-69/+123
by reading asset XML a single time with a stream reader rather than multiple times. Reading large XML documents (e.g. complex attachments) is CPU expensive - this must be done as few times as possible (preferably just once). Reading these documents into XmlDocument is also more resource intensive than using XmlTextReader, as per Microsoft's own publication "Improve .NET Application Performance and Scalability" Optimization of other cases will follow if this change is successful.
2014-08-26Don't allow update timer to invoke another scene update if the previous is ↵Justin Clark-Casey (justincc)1-1/+10
still active.
2014-08-26Fix frame times when updating scene on timer.Justin Clark-Casey (justincc)1-15/+17
2014-08-26Implement experimental non-default mechanism to update scene via a timer ↵Justin Clark-Casey (justincc)2-35/+62
rather than a persistent thread with sleep. This is to see if an inaccuracy in sleep times under load is responsible for increase in frame times even when there is spare time still available. Can currently only be activated by setting "debug scene set update-on-timer true". Can be switched between timer and thread with sleep updates whilst the scene is running.
2014-08-15If a user moves back in sight of a child region before the agent has been ↵Justin Clark-Casey (justincc)1-6/+3
closed on teleport, don't unnecessarily resend all avatar and object data about that region.
2014-08-15On teleport to a region that already has a child agent established (e.g. a ↵Justin Clark-Casey (justincc)1-32/+43
neighbour) don't resend all the initial avatar and object data again. This is unnecessary since it has been received (and data continues to be received) in the existing child connection.
2014-08-14Make RootTerseUpdatePeriod and ChildTerseUpdatePeriod configurable in ↵Justin Clark-Casey (justincc)1-0/+3
[InterestManagement] in OpenSim.ini for experimental purposes. If n > 1 for RootTerseUpdatePeriod only every n terse update is actually sent to observers on same region, unless velocity is effectively zero (to stop av drift). If n > 1 for ChildTerseUpdatePeriod only every n terse update is sent to observers in other regions, unless velocity is effectively zero. Defaults are same as before (all packets are sent). Tradeoff is reduction of UDP traffic vs fidelity of observed av mvmt. Increasing n > 1 leads to jerky observed mvmt immediateley for root, though not on child, where experimentally have gone to n = 4 before jerkiness is noticeable.
2014-08-14Make some existing reprioritization values changeable outside the scene for ↵Justin Clark-Casey (justincc)1-15/+18
test purposes, and use more consise property syntax. No functional change.