Musisback Posted November 16, 2010 Share Posted November 16, 2010 I write all my user-made functions in a external file "functions.vss" that I include in my other script. Of course, all my PIO's do not use all the functions but they still contain all of the function declarations within their script. Can this make the PIO's slower to be created / reset during their use? Or does it only make their compilation slower? Is there an other way to handle user made functions? Thanks, Quote Link to comment
MullinRJ Posted November 16, 2010 Share Posted November 16, 2010 No, User Functions will not slow down a PIO's regen time, especially if they are not executed. Poorly written one's will, as will ones that contain a lot of loops, or ones that search through a lot of objects, etc. If you are worried about file size, you could split your functions by type, but you'll have to be careful about the order they load. In Pascal, a function must be defined before it is called. Another thing you could do, when you are finished developing a PIO, make a copy of everything in another folder and remove all the code you don't use. Then compile it so everything gets copied into the PIO. If the files end in .px a copy of the code will be loaded into the PIO and it will be stand alone. Keep your original files with all the $Included files so you can make easy changes. You'll have to read more about it in the VS manual to get a better feel for your compile options. Raymond Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.