Commit Graph

2749 Commits (a086adf4271a014334529cd6ea3ee24b75c9195d)

Author SHA1 Message Date
Justin Clark-Casey (justincc) a086adf427 Add experimental job engine to see if queueing some existing async work 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-09-09 18:14:56 +01:00
Justin Clark-Casey (justincc) 41f2f3132b For monitoring purposes, start non-timeout tasks (which do not currently use 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-05 23:20:59 +01:00
Justin Clark-Casey (justincc) ac866a1c46 Add [EntityTransfer] AllowAvatarCrossing setting to determine whether avatars are allowed to cross regions at all.
Defaults to true.  For test purposes.
2014-09-03 00:25:56 +01:00
Justin Clark-Casey (justincc) d582db6132 Fix recent regression from 473c5594 where camera started to judder on moving 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-09-02 23:39:52 +01:00
Justin Clark-Casey (justincc) 473c559478 As per the LL grid, if an avatar is sitting then return it's velocity relative to the region rather than relative to its seat.
Resolves http://opensimulator.org/mantis/view.php?id=7175
2014-08-30 01:09:33 +01:00
Justin Clark-Casey (justincc) a02dae566c Fix issue where moving a seated avatar would not adjust their subsequent stand position.
Addresses http://opensimulator.org/mantis/view.php?id=7299
2014-08-30 00:26:18 +01:00
Justin Clark-Casey (justincc) 099212167b Implement STATUS_BLOCK_GRAB_OBJECT in llSetStatus()/llGetStatus() and 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-29 23:40:21 +01:00
Justin Clark-Casey (justincc) 1b75ec5647 Ignore whitespace when reading serialized XML objects.
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-29 19:08:23 +01:00
Justin Clark-Casey (justincc) 1a3ffda852 minor: Eliminate more unnecessary code copying individual parameters for Vector3 copying in Scene - this is not necessary as Vector3 is a value type 2014-08-28 18:37:34 +01:00
Justin Clark-Casey (justincc) f132f642b2 On code section that rezzes single objects and attachments, reduce CPU use 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-28 18:15:33 +01:00
Justin Clark-Casey (justincc) b1ff78f4d8 Don't allow update timer to invoke another scene update if the previous is still active. 2014-08-26 18:52:09 +01:00
Justin Clark-Casey (justincc) 42bb122232 Fix frame times when updating scene on timer. 2014-08-26 18:13:38 +01:00
Justin Clark-Casey (justincc) 64f640f901 Implement experimental non-default mechanism to update scene via a timer 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-26 18:13:38 +01:00
Justin Clark-Casey (justincc) e0c6bfa81e If a user moves back in sight of a child region before the agent has been closed on teleport, don't unnecessarily resend all avatar and object data about that region. 2014-08-15 21:47:34 +01:00
Justin Clark-Casey (justincc) 91e1aaa5d4 On teleport to a region that already has a child agent established (e.g. a 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-15 21:47:34 +01:00
Justin Clark-Casey (justincc) 4c781db572 Make RootTerseUpdatePeriod and ChildTerseUpdatePeriod configurable in [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-14 01:39:26 +01:00
Justin Clark-Casey (justincc) 6ea82ad48a Make some existing reprioritization values changeable outside the scene for test purposes, and use more consise property syntax.
No functional change.
2014-08-14 01:16:58 +01:00
Justin Clark-Casey (justincc) bc0895c758 On entity transfer of scene presence, replace polling sleep in SP.WaitForUpdateAgent() with a triggered event instead.
Rapid polls are more expensive than triggered events (several polls vs one trigger) and may be problematic on heavily loaded simulators where many threads are vying for processor time.
A triggered event is also slightly quicker as there is no maximum 200ms wait between polls.
2014-08-13 23:45:51 +01:00
Justin Clark-Casey (justincc) 0d2a25b477 Remove redundant origin region lock in SP.CompleteMovement()
This is already going to be correctly set by WaitForUpdateAgent() earlier on in that method, which is always called where a callback to the originating region is required.
2014-08-13 23:11:32 +01:00
Justin Clark-Casey (justincc) 30f1b424bb Change RootRotationUpdateTolerance from 0.01 to 0.1 in code as well. 2014-08-08 23:47:53 +01:00
Oren Hurvitz e36e416637 Fixed crash when using Allowed/Denied Viewers, and the viewer's name is shorter than one of the test strings
This fixes http://opensimulator.org/mantis/view.php?id=7294
2014-08-06 19:02:15 +03:00
Justin Clark-Casey (justincc) 78ccadb27e Add RootPositionUpdateTolerance, RootRotationUpdateTolerance, and RootVelocityUpdateTolerance parameters to [InterestManagement] in OpenSimDefaults.ini
These govern when AgentUpdates are sent to observers on position, rotation and velocity changes to an avatar (including the avatar themselves).
Higher values reduce AgentUpdate traffic but at a certain level will degrade smoothness of avatar and perceived avatar movement.
2014-08-06 00:53:14 +01:00
Justin Clark-Casey (justincc) 961cb9cc77 refactor: Rename recent new Client*UpdateTolerance to Root*UpdateTolerance for better accuracy and consistency with other similar parameters 2014-08-06 00:35:26 +01:00
Justin Clark-Casey (justincc) fcf5fb5dfd Implement "scene debug set root-upd-per" for dropping 1 in N root agent updates except to originator
For experimental purposes.
Also corrects a previous bug where each terse update sent was counted rather than each set of terse updates to agents.
2014-07-29 18:54:16 +01:00
Justin Clark-Casey (justincc) 0f87a99e54 Add debug mechanism for only sending 1 in N AgentUpdate packets to child agents.
Allows experiments in manually reducing updates under heavy load.
Activated by "debug scene set client-upd-per" console command.
In a simple test, can send as few as every 4th update before observed movement starts becoming disturbingly rubber-banded.
2014-07-29 18:09:11 +01:00
Justin Clark-Casey (justincc) f54fccba1e Make it possible to change avatar position update, rotation and velocity tolerances on the fly.
This is done via "debug scene set client-pos-upd, client-rot-upd, client-vel-upd".
For testing purposes.
2014-07-29 03:13:10 +01:00
Justin Clark-Casey (justincc) 3654ae8d8c Allow the "debug scene set physics false|true" command to work when bulletsim physics is running in a separate thread.
This will also allow the "disable physics" setting in the region debug viewer dialog to work in this circumstance.
2014-07-29 01:21:15 +01:00
Justin Clark-Casey (justincc) f6f7585ec5 Add a "debug scene set child-repri <double>" command that allows child reprioritization distance to be changed on the fly.
This governs when child agent position changes are sent to neighbouring regions.
Corresponding config parameter is ChildReprioritizationDistance in [InterestManagement] in OpenSim.ini
For test purposes.
2014-07-29 00:13:29 +01:00
Justin Clark-Casey (justincc) 3a87cce2e0 Fix recent regression in 3c6becd5 where login or hg login to variable sized regions failed with outdated simulator message.
I forgot that a null 'their version' would not be passed over the wire and ends up as an empty string instead (like older simulators).
So instead pass through the correct simulator protcol version instead (SIMULATOR/0.3) when querying from login or hg login.
Also removes a debug console write for agent limit accidentally left in for the same commit.
Relates to mantis 7276
2014-07-22 18:04:28 +01:00
Justin Clark-Casey (justincc) 3c6becd524 On login and first HG entrance to a foreign grid, perform query access checks before proceeding. 2014-07-21 23:53:33 +01:00
Oren Hurvitz 899bcb7acd Fixed: after a Hypergrid teleport, attachments often either disappear, or appear both on the avatar AND as in-world objects.
Another manifestation of this bug is that after a Hypergrid teleport, when you click on one of the avatar's attachments the object doesn't show its name. This means that the viewer knows the attachment is there, but the simulator does not.

The problem was caused by treating Hypergrid teleports as if they're Logins (because the teleport flag ViaLogin is enabled).

This may fix: http://opensimulator.org/mantis/view.php?id=7238
This may fix: http://opensimulator.org/mantis/view.php?id=7220
2014-07-21 09:29:51 +01:00
Oren Hurvitz 4c5d7d4683 Fixed problems if an avatar tries to cross regions when the previous cross hasn't completed yet
This caused the client to stop responding, and even the simulators to have problems. The solution is to disallow crossing before the previous cross has completed.
2014-07-21 09:23:13 +01:00
Oren Hurvitz f94b3bbe0f Minor: changed "existant" to "existent" 2014-07-21 09:15:05 +01:00
Oren Hurvitz 99ac770abb Close streams immediately when we finish using them 2014-07-21 08:30:03 +01:00
Dev Random 4e92b55231 Call RemoveScriptInstance when removing from inventory 2014-07-14 18:06:24 +01:00
Diva Canto 82b875317b On logout, delay the removal of AgentCircuitData until the very end, because that data structure contains important information about the agent that may be needed by modules. 2014-07-04 14:36:11 -07:00
Diva Canto 60ad72357e This fixes the bug related to rebooting neighboring varregions while avatars are logged in; the avies would not see the region anymore until they relogged. Same problem as before: inconsistent calculation of scope. 2014-07-04 11:45:30 -07:00
Diva Canto d99c8e68a7 It turns out that child agent management has had a bug for a while: there was an inconsistency in the scope between opening and closing child agents in neighboring regions. For opening (in EnableChildAgents), the region's DrawDistance was being used; for closing (in IsOUtsideView) , the viewer's (SP) DrawDistance was being used. This fixes this inconsistency, therefore eliminating bugs observed in TPs between, at least, neighboring varregions. 2014-07-04 10:13:53 -07:00
Justin Clark-Casey (justincc) 4ba396b81c Temporarily disable new regression test TestLifecycle() until I have a chance to fix it
This was working for me locally because it was still picking up all my *.ini config files, which jenkins won't have in its test env
2014-07-03 00:30:42 +01:00
Justin Clark-Casey (justincc) c3923a1aa6 Re-enabled TestLifecycle regression test logging so I can get some idea of why it's failing on jenkins but not locally 2014-07-03 00:01:47 +01:00
Justin Clark-Casey (justincc) 889194db63 Actually call Close() for shared region modules when the simulator is being shutdown.
Adds regression test for this case.
2014-07-02 23:49:25 +01:00
Justin Clark-Casey (justincc) fe6dab7f13 minor: Change default max phys prim size in code to match OpenSimDefaults.ini 2014-06-28 00:20:09 +01:00
Justin Clark-Casey (justincc) cd031d129a minor: change allow script crossings default in code to true in order to match OpenSimDefaults.ini 2014-06-28 00:18:00 +01:00
Diva Canto 807fb8339b Revert "Let HG users be gods too, if they have local permission to be so."
HG gods are not safe at this point. It's better to disallow this until
they can be made safe.

This reverts commit e86c765be3.
2014-06-09 22:00:10 -07:00
Diva Canto e86c765be3 Let HG users be gods too, if they have local permission to be so. 2014-06-09 21:46:24 -07:00
Robert Adams 0aa0dad478 Send multiple terrain patches per terrain update packet if terrain
draw distance optimization is enabled. Makes terrain editting a lot
snappier.
2014-06-01 19:23:49 -07:00
Robert Adams 0300ec45eb Modifications to debugging printouts. No functional changes. 2014-05-31 12:19:51 -07:00
Robert Adams 22dade6463 varregion: More tweeking to only sending patches within avatar draw distance.
Still has problems with child avatars.
2014-05-31 12:19:50 -07:00
Robert Adams db5a42ffac varregion: send terrain patches from where the avatar outward if the parameter
[Terrain]SendTerrainUpdatesByViewDistance=true.
This tracks which patches have been sent to each client and outputs the
patches as the avatar moves.
2014-05-31 12:19:49 -07:00
Justin Clark-Casey (justincc) bf5320eb26 minor: rename velocidyDiff -> velocityDiff 2014-05-30 22:21:13 +01:00