Sub Position in large scripts

Which hub software is the best? Where can I find script XXX? Discuss it here...(no, this is not for advertising your hub...)

Moderator: Moderators

Locked
ButterflySoul
Posts: 210
Joined: 2003-01-23 17:24
Location: Nevada
Contact:

Sub Position in large scripts

Post by ButterflySoul » 2003-04-07 00:27

In very large scripts (>2000 lines) does the position of the subs (as you see them in a script editor) matter ? Will it run faster to have the ones called often on top and the ones called less often on bottom ?

I'm not sure how the VB/VBS engine works deep down, so it's maybe a silly question, sorry... But for example, an Option Explicit statement needs to be at the top of your script, so I was tempted to think position matters; yet every script I saw so far had its Main sub on top, and it's called only one single time (at script startup).

I'm not too sure how to test it either in order to see/not see performance differences, as I guess they're not major, and I'm not too found with the idea of shuting down my hub to test it with a "load-free" VBS engine =p If you have an idea to test it, and just tell me roughly what kind of code you need, I'll gladly write it though =)
[CoZ] Children of Zeus
-----
Shadows DC Hub - VBS and JS scripting at their best

Locked