From bea9e068b487e5c7c93ca171469bf234e09abb3e Mon Sep 17 00:00:00 2001 From: Dmitry Bushev Date: Wed, 11 Sep 2024 11:15:54 +0300 Subject: [PATCH] Remove pool of FileManager actors (#11036) close #10970 Changelog: - remove: FileManager actors pool Language Server executes IO on a separate thread pool for blocking operations and does not block the actor --- .../org/enso/languageserver/boot/MainModule.scala | 2 +- .../enso/languageserver/filemanager/FileManager.scala | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/engine/language-server/src/main/scala/org/enso/languageserver/boot/MainModule.scala b/engine/language-server/src/main/scala/org/enso/languageserver/boot/MainModule.scala index a28a06d188..bd2bbbb31b 100644 --- a/engine/language-server/src/main/scala/org/enso/languageserver/boot/MainModule.scala +++ b/engine/language-server/src/main/scala/org/enso/languageserver/boot/MainModule.scala @@ -222,7 +222,7 @@ class MainModule(serverConfig: LanguageServerConfig, logLevel: Level) { new ContentRootManagerWrapper(languageServerConfig, contentRootManagerActor) lazy val fileManager = system.actorOf( - FileManager.pool( + FileManager.props( languageServerConfig.fileManager, contentRootManagerWrapper, fileSystem, diff --git a/engine/language-server/src/main/scala/org/enso/languageserver/filemanager/FileManager.scala b/engine/language-server/src/main/scala/org/enso/languageserver/filemanager/FileManager.scala index f45c218bc2..12d7a19caa 100644 --- a/engine/language-server/src/main/scala/org/enso/languageserver/filemanager/FileManager.scala +++ b/engine/language-server/src/main/scala/org/enso/languageserver/filemanager/FileManager.scala @@ -2,7 +2,6 @@ package org.enso.languageserver.filemanager import akka.actor.{Actor, Props} import akka.pattern.pipe -import akka.routing.SmallestMailboxPool import com.typesafe.scalalogging.LazyLogging import org.enso.languageserver.data.FileManagerConfig import org.enso.languageserver.effect._ @@ -323,13 +322,4 @@ object FileManager { exec: Exec[BlockingIO] ): Props = Props(new FileManager(config, contentRootManager, fs, exec)) - - def pool( - config: FileManagerConfig, - contentRootManager: ContentRootManager, - fs: FileSystem, - exec: Exec[BlockingIO] - ): Props = - SmallestMailboxPool(config.parallelism) - .props(props(config, contentRootManager, fs, exec)) }