Says don't seem better than linked messages

I'm writing an LSL script, and it's too slow. A friend suggested using linked messages to send the message to another prim to say the string, in case there was a delay associated with saying something. But there doesn't seem to be:

default {
    touch_start(integer total_number) {
        float start = llGetWallclock();
        integer i;   
        for (i = 0; i < 10000; i++) {
            llSay(1234, "hi this is my message");
        }
        float end = llGetWallclock();

        llOwnerSay("10,000 says took " + (string) (end - start) + " secs");
    }
}

Object: 10,000 says took 229.000000 secs

default {
    touch_start(integer total_number) {
        float start = llGetWallclock();
        integer i;   
        for (i = 0; i < 10000; i++) {
            llMessageLinked(LINK_ALL_OTHERS, 0, "hi this is my message", NULL_KEY);
        }
        float end = llGetWallclock();

        llOwnerSay("10,000 linked messages took " + (string) (end - start) + " secs");
    }
}

Object: 10,000 linked messages took 237.000000 secs

I guess I need to optimize somehow else.

Comments

comment

I think ‘say’ has rate limiting as an anti-abuse measure, since passing messages between objects is the same as saying things to other people. You could try batching messages up and parsing them back out or something.

comment

That’s what I was trying to test, whether llSay has a rate limit. I don’t think linked messages should be equivalent to says in that way… but a few other people had other suggestions, so I’m gonna try these tests again anyway.