refactor: optimize the bot even more!!!
it improved a lot, memory usage is pretty good now, just reducing the amount of threads for each executor and adding some more delay to the filtering stuff
This commit is contained in:
@@ -13,8 +13,8 @@ import java.util.concurrent.Executors;
|
||||
public class DatabasePlugin {
|
||||
// is it OK to have a completely separate ExecutorService to do the executions?
|
||||
public static final ExecutorService executorService = Executors.newFixedThreadPool(
|
||||
Runtime.getRuntime().availableProcessors(),
|
||||
new ThreadFactoryBuilder().setNameFormat("ExecutorService (database) #%d").build()
|
||||
1,
|
||||
new ThreadFactoryBuilder().setNameFormat("ExecutorService (database)").build()
|
||||
);
|
||||
|
||||
public Connection connection;
|
||||
|
||||
Reference in New Issue
Block a user