Skip to main content

4 posts tagged with "Architecture"

Posts about Exodra's architecture and design.

View All Tags

Your React Code, Faster Than React

· 5 min read
Andrei Baikov
Exodra Creator

@exodra/react-compat implements React's public API on Exodra machines. Alias react and react-dom to it, and a React application — its components, its hooks, the libraries it installs — runs with Exodra as the renderer. Add one Babel plugin, and the same source mounts faster than it does on React itself.

That is a claim about a specific application measured in a specific way, so here is the application, the way, and every number.

WeakMaps Are the Cleaner Separation — Patching Is Faster

· 8 min read
Andrei Baikov
Exodra Creator

:::note This post measures a renderer that has been deleted

The WeakMap<schema, record> measured below, the {type, attrs} schema objects it was keyed by, and the ExoNodeDom renderer around them are gone (packages/core/src/index.ts:10-12, packages/dom/src/index.ts:9-10). The measurement stands as a measurement; the code it was taken on does not exist.

And the conclusion moved on three times. This post's fix was "put the record in a slot on the schema object". After that the record became a TExoNodeDom that the CHILD owns (packages/dom/src/dom/types/TExoNodeDom.ts), with the element pointing back under Symbol.for('exo.child') — and on 2026-08-30 that back-pointer was removed outright, so an element carries nothing at all. The "16% of an initial mount / 2.4–2.8× faster" figure that used to be quoted for it is withdrawn: it was measured for a schema→record table, never for an element-keyed one. What replaced it is the axis child-mark / pool, which prices an element expando against a WeakMap entry directly.

It is kept because a post is a record of what was believed when it was written. :::

A while back I wrote about why Exodra's WeakMap core beats the legacy one. Everything in that post is still true about design. This one is about what happened when I finally measured it: the renderer's WeakMap<schema, record> was costing about 11% of every mount, and moving the record onto a slot on the schema object got it back.

Three Attributes Architecture - Maximum Performance Without Runtime Checks

· 6 min read
Andrei Baikov
Exodra Creator

:::note This post describes a renderer that has been deleted

Everything below is written about the ExoNodeDom three-props runtime — h(type, attrs), static / bindables / bindableLists, defineComponent, and the @exodra/babel-plugin-jsx compiler. None of that exists any more. @exodra/core states the deletion in its own barrel (packages/core/src/index.ts:10-12), as does @exodra/dom (packages/dom/src/index.ts:9-10), and the babel plugin has been replaced by @exodra/babel-plugin-schema. Do not write code from this post, and do not hand it to an assistant as a description of Exodra.

What survived is the argument, not the API. A component is now one value carrying two halves — a schema built once at module load, and a wiring function run per instance (exoComponent(build, P => wire)). The schema declares ports; the wiring fills them with a verb that says how: c.set once, c.bind kept in step, c.on a listener, c.bindList a reconciled children port. The bucket is gone; "the renderer never has to ask what kind of value this is" is exactly why. See Core Concepts and Getting Started.

It is kept because a post is a record of what was believed when it was written. :::

Every reactive framework faces the same dilemma: how to handle different types of properties efficiently. Most frameworks choose developer convenience over performance. We chose performance.

Why the WeakMap Core Is a Better Design Than the Legacy One

· 4 min read
Andrei Baikov
Exodra Creator

:::note This post has been superseded, and the renderer it argues about is deleted

Exodra no longer uses a WeakMap for per-node bookkeeping. It first moved to a slot on the schema — see WeakMaps Are the Cleaner Separation — Patching Is Faster — and then the whole ExoNodeDom three-props renderer was removed (packages/core/src/index.ts:10-12, packages/dom/src/index.ts:9-10). Today the record is a TExoNodeDom and the CHILD holds the element, not the other way round (packages/dom/src/dom/types/TExoNodeDom.ts). For a while the element also pointed back, under Symbol.for('exo.child'); that mark was removed on 2026-08-30.

The design argument below still holds; it just lost to a measurement, twice. :::

Exodra moved from a legacy per-node bookkeeping model to a WeakMap-based core. This post is about why that's a better design — less work per node, GC-driven cleanup, and cache-friendly lookups. It is deliberately light on "X% faster" numbers, because the honest, reproducible timings come from npm run bench, not prose.