Hi, I have added a performance test using a message with encrypted members. Running this test pointed out that using a Dictionary in both DelegateFactory and for IsSystemType yields a NullReferenceException during parallel execution. After changing back to ConcurrentDictionary, the test runs fine.

It also pointed out that the performance test runs fine when I use json, but not when I use the XmlMessageSerializer:

Unhandled Exception: System.AggregateException: One or more errors occurred. ---
> System.InvalidOperationException: Type System.Object was not registered in the
 serializer. Check that it appears in the list of configured assemblies/types to
 scan.
   at NServiceBus.Serializers.XML.XmlMessageSerializer.Write(StringBuilder build
er, Type t, Object obj) in d:\Projects\GitHub\NServiceBus\src\NServiceBus.Core\S
erializers\XML\XmlMessageSerializer.cs:line 902
   at NServiceBus.Serializers.XML.XmlMessageSerializer.WriteObject(String name,
Type type, Object value, StringBuilder builder, Boolean useNS) in d:\Projects\Gi
tHub\NServiceBus\src\NServiceBus.Core\Serializers\XML\XmlMessageSerializer.cs:li
ne 963

This also happens in develop, the version without my performance fixes. So I guess this is a different issue.