How does plugins work internally?
I was wondering what happens to plugins once loaded into WeBuilder. And if it's worth minimizing the script code, removing comments etc.
So:
1) Does the plugin script get "compiled" to some internal code when plugin is enabled?
2) Or does it run it in "script" mode?
How does plugins work internally? (Is it worth minimizing)
Moderator: kfury77
Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
Please try to follow these guidelines. This will help to receive faster and more accurate response.
- Check the Support section of the corresponding product first. Chances are you will find your answer there;
- Do not create new topics for already reported problems. Add your comments to the existing topics instead;
- Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
- Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
- Include the version number of the software you are using;
- This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
How does plugins work internally? (Is it worth minimizing)
There are 10 types of people in the world: Those who understand binary and those who don't.
Re: How does plugins work internally? (Is it worth minimizin
Basically all plugins are run when WeBuilder is launched, at which point the plugin script is compiled (to a sort of bytecode) and executed. During initialization plugins should only declare variables and initialize events so they won't have any impact to startup times. After that plugin code is executed only when the corresponding events are triggered, so if plugin only creates menu items, any of its code won't be executed unless these menu items are clicked.
There is no need to minimize script, it won't have any impact. It's better if the code is clear and understandable so that everyone who wants can learn. What you should rather pay attention is memory leaks - e.g. if script constantly creates more and more new objects without freeing them, it could fill up the memory.
There is no need to minimize script, it won't have any impact. It's better if the code is clear and understandable so that everyone who wants can learn. What you should rather pay attention is memory leaks - e.g. if script constantly creates more and more new objects without freeing them, it could fill up the memory.
Blumentals Software Programmer
Re: How does plugins work internally? (Is it worth minimizin
Thanks for the feedback.
That was more or less as I expected. Specially when you have to disable/enable plugins for changes to take effect.
That was more or less as I expected. Specially when you have to disable/enable plugins for changes to take effect.
There are 10 types of people in the world: Those who understand binary and those who don't.