InsightsPlugin / Insights

Insights - Super configurable (region) Limits + Asynchronous Scans [1.21]
https://modrinth.com/plugin/insights
GNU General Public License v3.0
135 stars 22 forks source link

Suggestion about performing a blocking I/O operation on the main thread #176

Closed FunkyNico closed 1 year ago

FunkyNico commented 2 years ago

Hello, I have found this suggestion from another spigot plugin called Lagmonitor : Make stop the plugin from doing a blocking I/O operation on the main thread because this could affect the server performance, the thread pauses until it gets the response. Such operations should be performed asynchronous from the main thread. Besides gameplay performance it could also improve startup time.

Insights Plugin Version: 6.12.1 / Server: Purpur-1762 (MC: 1.19.2) (Implementing API version 1.19.2-R0.1-SNAPSHOT) (Git: 39e30d6 on HEAD).

Log: https://logs.apexminecrafthosting.com/tOylXw3

Thanks :D

FrankHeijden commented 2 years ago

The IO operation Insights does here is loading addons, this only happens at startup and it needs to happen on the main thread ^^

Lagmonitor is probably complaining because it is a scheduled task, is there a way to let this plugin ignore this operation? If not, maybe suggest it to the developer