Results 1 to 7 of 7

Thread: sqs file size, memory usage and lag

  1. #1
    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




  2. #2
    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.

  3. #3
    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.
    Current project: TroopMon V0.8

  4. #4
    Chief Warrant Officer
    Join Date
    Sep 6 2001
    Location
    British Columbia, Canada
    Posts
    3,458
    If you got script that big - you can be sure it's bad script
    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
    [im]http://www.roughnecks.org/malboeuf/pissonTKC.gif[/img] >100kb
    Roughneck Whore House - rn1.roughnecks.org
    AMD 64x2 4400 2200@2450 Mhz- 2 gig dual DDR PC4000 - SATA HDs

  5. #5
    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

  6. #6
    @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.

  7. #7
    Quote Originally Posted by [b
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •