CloudNetService / CloudNet-v2

Cloud Network Environment Technology
Apache License 2.0
35 stars 33 forks source link

Rework the scheduler and file utility #159

Open GiantTreeLP opened 5 years ago

GiantTreeLP commented 5 years ago

The scheduler is very weird and wastes resources. The TaskScheduler is very weirdly set up and requires major rewriting.

This is very noticable with long lasting tasks like copying a large template.

https://github.com/CloudNetService/CloudNet/blob/development/cloudnet-lib/src/main/java/de/dytanic/cloudnet/lib/utility/threading/Scheduler.java

https://github.com/CloudNetService/CloudNet/blob/development/cloudnet-lib/src/main/java/de/dytanic/cloudnet/lib/scheduler/TaskScheduler.java

It would be best to simply replace this large class with a ScheduledExecutorService

While we are at it, we should also rewrite the FileUtility to use ready-made methods directly from Java: https://github.com/CloudNetService/CloudNet/blob/development/cloudnet-wrapper/src/main/java/de/dytanic/cloudnetwrapper/util/FileUtility.java.

Current progress:

issue-label-bot[bot] commented 5 years ago

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.94. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.