Ayelin Ethaniel Posted May 24, 2013 Share Posted May 24, 2013 Greetings fellows!I'd like to avoid a lag problem in the future and i have two things in my mind:1. solution: There is given 7 scripts. Each scripts has its own listener and dialog. Each scripts can call and communicate by each others via link message.2. solution: Given 7 scripts, Each script has its own dialog, set to a channel by an other script. This script handles all of the dialog messages of the 7 scripts, and handling functions via link message in each scripts.Each scripts has it's own functions, difference between two solution is removing listens and placing it into one script. this script will be a substitution of listen function and forwarding commands via linked message.Which one cause more lag? Link to comment Share on other sites More sharing options...
Innula Zenovka Posted May 24, 2013 Share Posted May 24, 2013 Why are you using all those scripts? Assuming everything is in the same linkset, which it presumably is since you're using link messages, why do you need more than one script? Link to comment Share on other sites More sharing options...
Dora Gustafson Posted May 24, 2013 Share Posted May 24, 2013 I agree with what innula says If you must have seven scripts I guess that trading chat communication for link messages will cause less lag provided you can use one llListen instead of seven and one chat channel instead of seven :smileysurprised::smileyvery-happy: Link to comment Share on other sites More sharing options...
Ayelin Ethaniel Posted May 24, 2013 Author Share Posted May 24, 2013 I am created a pluginable script, with few plugins and the next owner can choose from them which one they want to use. An other problem, they have many functions that can't handle a simple script in 64kb. Recently the set is running with 0.02-0.04ms cpu usage and i know it can go downer. Same sets which i have by an other creator is running on 0.1-0.14ms that is a bit high for a simple item + the avatar. Link to comment Share on other sites More sharing options...
Qie Niangao Posted May 24, 2013 Share Posted May 24, 2013 I'd suggest trying it both ways and seeing which wins. My hunch is that it will be difficult to measure much of a consistent benefit either way. If I had to make an argument in favor of the multiple listens it would be that only one script will run when a dialog response is received by its channel-specific listen, whereas link messages will wake up all the scripts with each response, all but one of which will immediately detect that the message is not for them. (That's assuming the scripts are all in the same prim so a link message can't be targeted to a specific script by its link address.) 1 Link to comment Share on other sites More sharing options...
Nova Convair Posted May 24, 2013 Share Posted May 24, 2013 if the listens are for dialogs - where is the problem? There is only one listen open and only if a dialog is in use. If the listens are always open your code is bad, so open the listen when needed and close after dialog is finished or timer runs out due to the timeout. 1 Link to comment Share on other sites More sharing options...
Ayelin Ethaniel Posted May 29, 2013 Author Share Posted May 29, 2013 Thank you for all replies! It took a little time but i made a quick measure. Both items are running on ~0.011ms as idle, on active use around 0.03ms. Difference between them is the "calming time" when script usage is going back to normal. In this time it seems llListen in every scripts (for dialogs) is better than linked message solution. And yes i use timeout function Thank you all! <3 Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now