Skip to content

Commit d7dd6ee

Browse files
committed
This is likely slower
1 parent f020bb2 commit d7dd6ee

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Codecs/Binary.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ public void Encode()
531531
StringDict.WriteSelf();
532532

533533
{
534-
var counter = new HashSet<Element>(Element.IDComparer.Default);
534+
var counter = new HashSet<Element>(); //(Element.IDComparer.Default);
535535
var elementCount = CountChildren(Datamodel.Root, counter);
536536

537537
Writer.Write(elementCount);
@@ -607,7 +607,8 @@ void WriteBody(Element elem)
607607
{
608608
StringDict.WriteString(attr.Key);
609609
var attr_type = attr.Value == null ? typeof(Element) : attr.Value.GetType();
610-
Writer.Write(TypeToId(attr_type, EncodingVersion));
610+
var attr_type_id = TypeToId(attr_type, EncodingVersion);
611+
Writer.Write(attr_type_id);
611612

612613
if (attr.Value == null || !Datamodel.IsDatamodelArrayType(attr.Value.GetType()))
613614
WriteAttribute(attr.Value, false);

0 commit comments

Comments
 (0)