From 2e8ccfd78bbe27e0b999d53eb261f81d3ad86fef Mon Sep 17 00:00:00 2001 From: Tuukka Lehtonen Date: Thu, 15 Mar 2018 16:33:04 +0200 Subject: [PATCH] Disable parallel graph.tg/header read, serializer ctor not thread-safe Having parallel() here caused random platform startup problems and doesn't account for any major speedup in normal use anyway. refs #7806 Change-Id: I37b26a3df622d4ad3b2ad744e43e2f08cf0284ff --- .../src/org/simantics/project/management/PlatformUtil.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bundles/org.simantics.project/src/org/simantics/project/management/PlatformUtil.java b/bundles/org.simantics.project/src/org/simantics/project/management/PlatformUtil.java index ac08db001..9dfa67efe 100644 --- a/bundles/org.simantics.project/src/org/simantics/project/management/PlatformUtil.java +++ b/bundles/org.simantics.project/src/org/simantics/project/management/PlatformUtil.java @@ -315,7 +315,11 @@ public class PlatformUtil { AtomicReference problem = new AtomicReference<>(); Collection gbundles = Arrays.stream(getBundles()) - .parallel() + // #7806: Due to databoard Binding/Serializer construction process thread-unsafety + // not even the DataContainer.readHeader invocations can run in parallel, most likely + // due to recurring serializer construction for Variant datatypes. + // Therefore, we must disable parallel loading for now. + //.parallel() .map(b -> { try { return problem.get() == null ? getGraph(b) : null; -- 2.47.1