Latency in LSL scripts with touch start and llLoadUrl

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Latency in LSL scripts with touch start and llLoadUrl

Asaff Belfer
Hello,

Lately we tried a script and found that it reacts pretty slowly and the
delay somewhat increases in the second and third clicks.

The script is a simple script that sends a url to the user after he clicks
on a scripted prim.

Here is the script:

default
{
    state_entry()
    {

    }

    touch_start(integer num_detected)
    {
        llOwnerSay("URL = " + "http://google.com");
        llLoadURL(llGetOwner(),"","http://google.com");
        llOwnerSay("URL = " + "http://google.com");
    }
}

May I ask you to try this script in your grids and click the prim a few
times? Do you get the dialog after 6-8 seconds from the click too?

Thanks,
Asaff
_______________________________________________
Opensim-users mailing list
[hidden email]
http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: Latency in LSL scripts with touch start and llLoadUrl

Dr Ramesh Ramloll
It's instantaneous on my end (repeatedly), no slowdown experienced.

On Sun, Mar 10, 2019 at 10:21 AM Asaff Belfer <[hidden email]> wrote:

> Hello,
>
> Lately we tried a script and found that it reacts pretty slowly and the
> delay somewhat increases in the second and third clicks.
>
> The script is a simple script that sends a url to the user after he clicks
> on a scripted prim.
>
> Here is the script:
>
> default
> {
>     state_entry()
>     {
>
>     }
>
>     touch_start(integer num_detected)
>     {
>         llOwnerSay("URL = " + "http://google.com");
>         llLoadURL(llGetOwner(),"","http://google.com");
>         llOwnerSay("URL = " + "http://google.com");
>     }
> }
>
> May I ask you to try this script in your grids and click the prim a few
> times? Do you get the dialog after 6-8 seconds from the click too?
>
> Thanks,
> Asaff
> _______________________________________________
> Opensim-users mailing list
> [hidden email]
> http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-users
>


--
'Consider how the lilies grow. They do not labor or spin.'
*Rameshsharma Ramloll* PhD, CEO CTO DeepSemaphore LLC, Landisville, PA;
Affiliate *Research Associate Professor*, Idaho State University,
Pocatello, ID 83209 Tel: 208-240-0040
LinkedIn <http://www.linkedin.com/in/rameshramloll>
_______________________________________________
Opensim-users mailing list
[hidden email]
http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: Latency in LSL scripts with touch start and llLoadUrl

Haravikk
In reply to this post by Asaff Belfer


> On 10 Mar 2019, at 14:18, Asaff Belfer <[hidden email]> wrote:
>
> Hello,
>
> Lately we tried a script and found that it reacts pretty slowly and the
> delay somewhat increases in the second and third clicks.
>
> The script is a simple script that sends a url to the user after he clicks
> on a scripted prim.
>
> Here is the script:
>
> default
> {
>    state_entry()
>    {
>
>    }
>
>    touch_start(integer num_detected)
>    {
>        llOwnerSay("URL = " + "http://google.com");
>        llLoadURL(llGetOwner(),"","http://google.com");
>        llOwnerSay("URL = " + "http://google.com");
>    }
> }
>
> May I ask you to try this script in your grids and click the prim a few
> times? Do you get the dialog after 6-8 seconds from the click too?
>
> Thanks,
> Asaff

Could you try adding some kind of timing functions to your script? This might help diagnose the problem and determine if it's the scripting system or some kind of network delay or such instead.

For example:

default {
   state_entry() {
      llOwnerSay("Time now is " + llGetTimestamp());
   }

   touch_start(integer num_detected) {
       llOwnerSay(llGetTimestamp() + ": URL = " + "http://google.com");
       llLoadURL(llGetOwner(),"","http://google.com");
       llOwnerSay(llGetTimestamp() + ": URL = " + "http://google.com");
   }
}

This will at least let you see when the owner say messages were created, vs. when you received them (which is what your viewer shows), I also put a message in the state entry so when you reset the script you can see what time it reports compared to your current time, which might help in figuring out what the delay might be; if you touch the object right after resetting the script, then the first message the touch event sends should give you an idea of how long it took for the touch to register.

I'm afraid I've no idea what the cause might be, but this might help to gather more information.
_______________________________________________
Opensim-users mailing list
[hidden email]
http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-users