I wonder why Skript's performance is so different from Java.

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

NB_SuL

New Member
Feb 15, 2017
6
0
0
22
I recently compared the computation speed with the same code from Skript and Java Plugin and there was a huge difference.
But isn't Skript's code going to eventually be translated into Java's code?
So, why does Skript have such a huge performance gap with Java Plugin?
And is there any way to improve the underlying performance of Skript?
 
I recently compared the computation speed with the same code from Skript and Java Plugin and there was a huge difference.
But isn't Skript's code going to eventually be translated into Java's code?
So, why does Skript have such a huge performance gap with Java Plugin?
And is there any way to improve the underlying performance of Skript?
Skript has to parse every single bit of code you write, and translate it into something the Bukkit API can interpret and run.
All of this is done at runtime. Its not like Skript translates your code to Java, it has to deal with every bit of code as it happens, which is why its going to take Skript a little (or a lot) longer to perform tasks than just writing it in Java.

There is no sure fire way to improve the overall performance of Skript without completely re-writing the majority of the plugin.
 
Status
Not open for further replies.