Jump to content
Developer Wiki and Function Reference Links ×

Does a lot of function declaration make the use of plugins slower ?


Musisback

Recommended Posts

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,

Link to comment

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

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...