All projects

MVPExperiment

JSON × Protobuf in Node — one run

Project created by Helison Dias

Inspiration: João Raul, Protobuf vs JSON — independent implementation; the article’s 14× is not from this repo.

Project preview: Benchmark de serialização (desktop view)Project preview: Benchmark de serialização (mobile view)

Overview

A synthetic JSON versus Protobuf experiment in Node.js, with storefront-inspired payloads. It measures one machine — not a real store, HTTP, compression, the browser, or customer data.

The live demo is that run’s dashboard. Hypothesis: advantages depend on shape and cardinality. João Raul’s 14× figure is a .NET scenario, not a result of this repo.

Limits

Results dashboard from one machine. JSON × Protobuf in Node. The pre-built message → bytes path was not measured. Does not measure a real store.

Problem

Serialization size and time change with payload shape; copying a multiple from another runtime does not prove the Node case.

How it was built

Measure JSON and Protobuf in the same Node process, on this machine, with a warmup protocol — and omit the pre-built path when there is no series.

What I learned

  • One-machine results. No real store traffic.

What the repo does

  • Native JSON versus @bufbuild/protobuf with codegen; warmup, serial processes, Node 22.
  • The dashboard is derived from already-measured raw files — it does not rerun the loop.
  • The README does not publish a results table on this site — no invented number.

Stack

Node.jsTypeScriptProtobuf

Live demoGitHub