maybe is faster.. maybe is slower because the both @... that is what im asking.. how faster is it than the hardrock's way?
I think it's better to load the scripts when needed. Looking at my test results above, you can see that the @ command indeed needs a lot of performance, and I think loading one script is less work for the cpu than checking ten conditions in ten waiting scripts
every frame.
But you're mentioning an interesting point. Loading a script is indeed a lot of work too, and above it was stated that a script isn't deleted from memory unless you use the exit command in it.
So, at least for non-looping scripts which have to be called several times in the mission, there'd be the way of preloading them via init.sqs.
You'd need the line
? (time<1) : goto "end"
and the label #end on the end of every script. I know that this isn't that well for the CPU as the engine has to search the label "end" from the beginning of the script, but let's just assume that doesn't matter in the first second of the mission. After that label, their should be the end of the script, plain without exit command.
Then you'd write in your init.sqs
;; load scripts
[] exec ...
[] exec ...
@(time>1)
;; do the rest
This way every non-looping script would be preloaded in the first second of the mission and would be available for the rest of the mission without the need to load it.
That's just hypothesis and I never tested it, but it would be interesting what you think about it.