Announcement

Collapse
No announcement yet.

One large script with many subs run from a HS event vs many small scripts

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • One large script with many subs run from a HS event vs many small scripts

    One large script with many subs running from HS events vs many small scripts.

    I have one large VBscript (~4000 lines).
    Would it run more efficiently if I split it into many small scripts?

    Thanks, Drew

  • #2
    Without knowing what you are trying to accomplish it is impossible to provide any guidance other than telling you that it might be best to break your logic down into smaller more manageable units.

    Comment


    • #3
      Originally posted by pfloyd View Post
      One large script with many subs running from HS events vs many small scripts.

      I have one large VBscript (~4000 lines).
      Would it run more efficiently if I split it into many small scripts?

      Thanks, Drew
      I asked a similar question a few months ago. HS will compile the script the first time it needs to run it after you have saved the script file. So it really does not matter if it is a bunch of small scripts or one large script as far as compiling time spent.

      However, there is an economy of scale with a large script. Being able to share common subroutines is one of them. I tend to combine functions that deal with the same area into one script file. For example, the code for handling WD200 status LEDs is in one script file, door locks in another, and so forth.

      Comment

      Working...
      X