Skip to content

Commit a03ad02

Browse files
committed
tweak worker pool size
1 parent 7aca743 commit a03ad02

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

packages/core/src/DocumentBuilder.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,7 @@ export const run = Effect.gen(function*() {
7979

8080
yield* Mailbox.toStream(idMailbox).pipe(
8181
Stream.debounce(500),
82-
Stream.tap(() =>
83-
Effect.logInfo(`${getIdCount()} documents built`).pipe(
84-
Effect.when(() => watchMode)
85-
)
86-
),
82+
watchMode ? Stream.tap(() => Effect.logInfo(`${getIdCount()} documents built`)) : identity,
8783
Stream.flatMap(() =>
8884
Stream.fromIterable(
8985
Iterable.map(idMap, ([documentName, ids]) => [documentName, Array.from(ids)] as const)
@@ -208,10 +204,8 @@ export class ContentWorkerPool
208204
scoped: RpcClient.make(ContentWorkerSchema.Rpcs),
209205
dependencies: [
210206
RpcClient.layerProtocolWorker({
211-
minSize: 1,
212-
maxSize: workerPoolSize,
213-
timeToLive: "30 seconds",
214-
concurrency: 3
207+
size: workerPoolSize,
208+
concurrency: 10
215209
}).pipe(
216210
Layer.provide(NodeWorker.layerPlatform(() => tsWorker("./ContentWorker")))
217211
)

0 commit comments

Comments
 (0)