Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008267opensim[REGION] Scripting Enginepublic2017-11-15 14:362018-09-11 05:26
Reportertampa 
Assigned To 
PrioritylowSeverityfeatureReproducibilityN/A
Statuspatch feedbackResolutionopen 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0008267: Make all standard LL-Function delays configurable
DescriptionFor purpose of debugging and generally having more control over the simulation behavior I wrote a patch to allow for reading overrides to the hardcoded delays of the LL-Functions that have them.

Also cleared up the previously long list of variables by putting them in a dictionary.

Before anyone starts with this, it's for debugging and special use-cases only, it is no excuse for bad lsl code and should never be a requirement for proper script execution.

Tested compiled binary with llSetPos delay of 0 and default 200 and verified override is working. Not all functions have been tested, reasonable assumption that if one works and is read correctly the rest should be too. Some functions due to being heavy on execution may exhibit no measurable change in execution delays.

Tested on mono 5.4.0, older versions may exhibit different behavior when delays are lowered.

Testing has shown that depending on SimFPS lower delays can work in some cases, but events may not fire accurately in extreme cases. This is expected behavior when they are executed "as fast as possible" and should not be seen as bug.

Would be interesting to test which functions specifically work with lower delays and which absolutely need their default value to be unchanged, may even hint at possible threading improvements, but I don't plan to put that work in just yet(also don't know how).

Patch is attached. I claim no authorship over any code in it and am not responsible for any trouble it may cause.
Steps To ReproduceTesting can be done by applying the patch and adding the [LL-Delays] with
OverrideDefaultDelay = true and any override for the delays described in OpenSimDefaults to the config. Most visible functions are llSetPos and llSetRot.

Example:

[LL-Delays]
OverrideDefaultDelay = true
SetPos_Delay = 0;
SetRot_Delay = 0;

TagsNo tags attached.
Git Revision or version number
Run ModeStandalone (1 Region) , Standalone (Multiple Regions) , Grid (1 Region per Sim) , Grid (Multiple Regions per Sim)
Physics EngineBulletSim
EnvironmentMono / Linux64
Mono VersionOther
Viewer
Attached Filesdiff file icon LL-Delays.diff [^] (44,370 bytes) 2017-11-15 14:36 [Show Content]

- Relationships

-  Notes
(0032440)
UbitUmarov (administrator)
2017-11-15 15:26

Thanks
But please provide a patch as described in
http://opensimulator.org/wiki/Submitting_code_to_OpenSim [^]
sorry :(
(0032876)
Fly-Man- (developer)
2018-08-24 12:22

@Tampa If you can update this patch with the most recent version of OpenSim Master and please use the patch explanation that Ubit explained. Then it's easier to test and also apply.
(0032915)
tampa (reporter)
2018-09-05 11:26

The patch still builds against master properly using git apply, I am not changing the format or anything, you can take the code as you like no need to use the specific patch file. Take it or leave it, but don't sass me for trying to help.
(0032916)
watcher64 (reporter)
2018-09-05 13:54

been doing this for a long time, even before Tampa's patch ...

But was told many times by core that this would NEVER be applied to core due to "security reasons" ..
(0032917)
djphil (reporter)
2018-09-06 19:40

"security reasons" ...
We can already put all the delays 0.
So explain to me ...
(0032918)
watcher64 (reporter)
2018-09-06 19:57

you can't actually put all the delays to zero ... Not without editing the source code , we are talking about some hardcoded delays that are built into LSL that cannot be overridden, by normal means ..


So explain to me how you think you can set the delays to 0?
(0032919)
watcher64 (reporter)
2018-09-06 19:59

These are all hardcoded delays built into LSL ..


protected int EMAIL_PAUSE_TIME = 20; // documented delay value for smtp.
- protected int m_sleepMsOnSetTexture = 200;
- protected int m_sleepMsOnSetLinkTexture = 200;
- protected int m_sleepMsOnScaleTexture = 200;
- protected int m_sleepMsOnOffsetTexture = 200;
- protected int m_sleepMsOnRotateTexture = 200;
- protected int m_sleepMsOnSetPos = 200;
- protected int m_sleepMsOnSetRot = 200;
- protected int m_sleepMsOnSetLocalRot = 200;
- protected int m_sleepMsOnPreloadSound = 1000;
- protected int m_sleepMsOnMakeExplosion = 100;
- protected int m_sleepMsOnMakeFountain = 100;
- protected int m_sleepMsOnMakeSmoke = 100;
- protected int m_sleepMsOnMakeFire = 100;
- protected int m_sleepMsOnRezAtRoot = 100;
- protected int m_sleepMsOnInstantMessage = 2000;
- protected int m_sleepMsOnEmail = 20000;
- protected int m_sleepMsOnCreateLink = 1000;
- protected int m_sleepMsOnGiveInventory = 3000;
- protected int m_sleepMsOnRequestAgentData = 100;
- protected int m_sleepMsOnRequestInventoryData = 1000;
- protected int m_sleepMsOnSetDamage = 5000;
- protected int m_sleepMsOnTextBox = 1000;
- protected int m_sleepMsOnAdjustSoundVolume = 100;
- protected int m_sleepMsOnEjectFromLand = 5000;
- protected int m_sleepMsOnAddToLandPassList = 100;
- protected int m_sleepMsOnDialog = 1000;
- protected int m_sleepMsOnRemoteLoadScript = 3000;
- protected int m_sleepMsOnRemoteLoadScriptPin = 3000;
- protected int m_sleepMsOnOpenRemoteDataChannel = 1000;
- protected int m_sleepMsOnSendRemoteData = 3000;
- protected int m_sleepMsOnRemoteDataReply = 3000;
- protected int m_sleepMsOnCloseRemoteDataChannel = 1000;
- protected int m_sleepMsOnSetPrimitiveParams = 200;
- protected int m_sleepMsOnSetLinkPrimitiveParams = 200;
- protected int m_sleepMsOnXorBase64Strings = 300;
- protected int m_sleepMsOnSetParcelMusicURL = 2000;
- protected int m_sleepMsOnGetPrimMediaParams = 1000;
- protected int m_sleepMsOnGetLinkMedia = 1000;
- protected int m_sleepMsOnSetPrimMediaParams = 1000;
- protected int m_sleepMsOnSetLinkMedia = 1000;
- protected int m_sleepMsOnClearPrimMedia = 1000;
- protected int m_sleepMsOnClearLinkMedia = 1000;
- protected int m_sleepMsOnRequestSimulatorData = 1000;
- protected int m_sleepMsOnLoadURL = 10000;
- protected int m_sleepMsOnParcelMediaCommandList = 2000;
- protected int m_sleepMsOnParcelMediaQuery = 2000;
- protected int m_sleepMsOnModPow = 1000;
- protected int m_sleepMsOnSetPrimURL = 2000;
- protected int m_sleepMsOnRefreshPrimURL = 20000;
- protected int m_sleepMsOnMapDestination = 1000;
- protected int m_sleepMsOnAddToLandBanList = 100;
- protected int m_sleepMsOnRemoveFromLandPassList = 100;
- protected int m_sleepMsOnRemoveFromLandBanList = 100;
- protected int m_sleepMsOnResetLandBanList = 100;
- protected int m_sleepMsOnResetLandPassList = 100;
- protected int m_sleepMsOnGetParcelPrimOwners = 2000;
- protected int m_sleepMsOnGetNumberOfNotecardLines = 100;
- protected int m_sleepMsOnGetNotecardLine = 100;
(0032920)
djphil (reporter)
2018-09-06 20:57

@watcher64

[XEngine]
    ; Sets the multiplier for the scripting delays
    ScriptDelayFactor = 1.0

Set ScriptDelayFactor = 0.0 to disable the delay.
(0032921)
watcher64 (reporter)
2018-09-06 20:57
edited on: 2018-09-06 20:59

Nope

But even if that is what it did, maybe you don't want EVERY function to have NO delay ...

(0032922)
djphil (reporter)
2018-09-06 21:05

It is for this reason that it would be nice to be able to set them in opensim.ini ...
I do not understand your "security reason" and you have not explained yet ...
(0032923)
watcher64 (reporter)
2018-09-06 21:25

Not my reason, was the reason given by core ...
(0032927)
tampa (reporter)
2018-09-11 05:26

The reasoning was spam. "Scripts could be used to break a simulator"
Does not make much sense to me as that is already possible even with those limits in place now and there being plenty other ways to cripple a simulator that don't require scripting at all. Even if the config side won't be implemented, least could be the dictionary object as you so vigorously requested me to use it instead of the individual variables in use now ;P

- Issue History
Date Modified Username Field Change
2017-11-15 14:36 tampa New Issue
2017-11-15 14:36 tampa File Added: LL-Delays.diff
2017-11-15 14:36 tampa Status new => patch included
2017-11-15 15:26 UbitUmarov Note Added: 0032440
2017-11-26 22:52 tampa Relationship added related to 0008003
2017-11-27 08:17 UbitUmarov Relationship deleted related to 0008003
2018-08-24 12:22 Fly-Man- Note Added: 0032876
2018-08-24 12:22 Fly-Man- Status patch included => patch feedback
2018-09-05 11:26 tampa Note Added: 0032915
2018-09-05 13:54 watcher64 Note Added: 0032916
2018-09-06 19:40 djphil Note Added: 0032917
2018-09-06 19:57 watcher64 Note Added: 0032918
2018-09-06 19:59 watcher64 Note Added: 0032919
2018-09-06 20:57 djphil Note Added: 0032920
2018-09-06 20:57 watcher64 Note Added: 0032921
2018-09-06 20:59 watcher64 Note Edited: 0032921 View Revisions
2018-09-06 21:05 djphil Note Added: 0032922
2018-09-06 21:25 watcher64 Note Added: 0032923
2018-09-11 05:26 tampa Note Added: 0032927


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker