From a2a6044e7e83fbb467fb61402c7c05807f3ae6bd Mon Sep 17 00:00:00 2001 From: Caleb Hulbert Date: Tue, 12 Sep 2023 17:07:20 -0400 Subject: [PATCH] fix: limit render threads --- .../java/org/janelia/saalfeldlab/paintera/PainteraBaseView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/janelia/saalfeldlab/paintera/PainteraBaseView.java b/src/main/java/org/janelia/saalfeldlab/paintera/PainteraBaseView.java index 28b31b26d..0f819b675 100644 --- a/src/main/java/org/janelia/saalfeldlab/paintera/PainteraBaseView.java +++ b/src/main/java/org/janelia/saalfeldlab/paintera/PainteraBaseView.java @@ -150,7 +150,7 @@ public PainteraBaseView( this.keyAndMouseBindings = keyAndMouseBindings; this.viewerOptions = viewerOptions .accumulateProjectorFactory(new CompositeProjectorPreMultiply.CompositeProjectorFactory(sourceInfo.composites())) - .numRenderingThreads(Math.max(1, Runtime.getRuntime().availableProcessors() - 2)); + .numRenderingThreads(Math.max(1, Math.min(Runtime.getRuntime().availableProcessors() - 1, 16))); this.views = new OrthogonalViews<>( manager, this.sharedQueue,