Plugin performances optimization
Hey you think SCore or ExecutableItems make your server run slower ? We will help you to improve the performance of our plugins.
First run a spark profiler to target the problem.
- 2.Now you have spark, wait that you reach your amount of average players
- 3.Then run /spark profiler
- 4.Wait 1 min or more
- 5.run /spark profiler --stop
- 6.Open the report😄
If you see that SCore appears in the plugins that consume a lot of performances and you see that is related to LoopManager "SCore::Task: com.ssomar.score.events.loop.LoopManager$1 (interval:5)" You can follow the little tutorial bellow:
First step if you don't need the default items, disable them. How ? Go in your server files -> in the folder plugins -> in the folder of ExecutableItems -> open the file config.yml and turn disableTestItems: false to true so disableTestItems: true then restart your server.
Second step if your problems persist and you still have the LoopManager in your report, it's probably because you use one or multiples items with a loop activator that has a too small delay. Too show which items use a loop and with which delay, I created a custom command to make your life simple. In your console or in-game type /score inspect-loop All LOOPS under 1 second are not adviced so I advice you to increase the delay of your loops. If you have an unessecary item with a loop, move or delete the config and reload.