From: Tuukka Lehtonen Date: Thu, 15 Mar 2018 14:33:04 +0000 (+0200) Subject: Disable parallel graph.tg/header read, serializer ctor not thread-safe X-Git-Tag: v1.43.0~136^2~541 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F81%2F1581%2F1;p=simantics%2Fplatform.git 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 --- 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;