Skip to content

Commit

Permalink
perf(json-crdt): ⚡️ speed up "val" node encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Nov 13, 2023
1 parent ea953b2 commit 9afda4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/json-crdt/codec/structural/binary/Encoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ export class Encoder extends CborEncoder<CrdtWriter> {

protected cVal(node: nodes.ValNode): void {
this.ts(node.id);
this.writeTL(CRDT_MAJOR_OVERLAY.VAL, 0);
// this.writeTL(CRDT_MAJOR_OVERLAY.VAL, 0);
this.writer.u8(0b00100000);
this.cNode(node.node());
}

Expand Down

0 comments on commit 9afda4e

Please sign in to comment.