Jump to content
Sign in to follow this  
Guest

sqs file size, memory usage and lag

Recommended Posts

Guest

Hey

Ive got a 'town battle' manager type script, that is currently 101 kbs, and it runs smoothly with delays that have checks mixed in are not laggy and delays are plenty long enough.

My question is, if anyone could tell me, even when a script has 'non' laggy applications (delays with non laggy checks, etc), can the sheer size of the script and complexity of other parts of the script that arent currently running still possibly decrease performance, and/or chew up memory over time, as this script runs for up to 40 min.

Im asking this, because, ye', again im about to add some more script to it, which wont lag, but, its getting bigger, and something like excessive memory usage would be hard to test as it would take considerable time to see any difference in performance due to memory usage.

Any input appreciated smile_o.gif

Share this post


Link to post
Share on other sites
Guest

Well, think ive found the light here.

Colonel Sanders Lite kindly pointed out to me the mere requirements of Arma, and really, a script that even weighed 500kb running constantly wouldnt do any harm provided it didnt have laggy checks during delays, considering memory usage would really be nothing considering Armas comp requirements.

Share this post


Link to post
Share on other sites

There "might" be a limit of lines that can be used though,

during debugging a 2000+ lines script for many hours i

finally solved my problem by putting all lines past 2000 into

a new script, but maybe i was just overworked and deleted the error-causing line during the copy/paste process. That needs

to be confirmed by someones else, i am not absolutely certain about that.

Share this post


Link to post
Share on other sites

If you got script that big - you can be sure it's bad script wink_o.gif

That just means you selected bad way to solve your idea.

Smth big have to be separeted into small tasks so it can be at least debugged easily. That is elementary scripting basis wink_o.gif

Share this post


Link to post
Share on other sites
Guest

Thanks for the responses, but all is well. There isnt an issue with the script itself, my only concern was the potential memory usage.

moving on

Share this post


Link to post
Share on other sites

@bdfy

Who sais that a big script is a bad script apart from the debugging aspect? The main goal is to avoid too many parallel scripts.

In theory it is better to have one script with a 1 second

delay, than 10 different scripts running parallel

and if you have a lot of conditions,parameters and actions

to control then your scripts will become loooong.

There is however some controversy about that topic here in the forums.

Another example of a big script is a switch do case construct

that lists a lot of different cases which doesn't run

continously. Scripts like that can also turn out to be long.

They can of course be splitted into many small scripts,

but when you are at it, adding more and more code, then

sometimes you find yourself with a huge script.

Share this post


Link to post
Share on other sites
Quote[/b] ]There is however some controversy about that topic here in the forums.

I think the term "Mountain out of a Mole hill†applies here. Suggesting anything written in an sqs\sqf is comparably to the actual code involved with the exe. Is stretching the realms of credibility smile_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×