Skip to content

Replace bl with @platformatic/dynamic-buffer - #116

Merged
mcollina merged 1 commit into
masterfrom
use-platformatic-dynamic-buffer
Oct 16, 2026
Merged

mcollina merged 1 commit into
masterfrom
use-platformatic-dynamic-buffer

Conversation

@mcollina

Copy link
Copy Markdown
Owner

Replace the bl BufferList dependency with @platformatic/dynamic-buffer.

DynamicBuffer reads integers without allocating a temporary slice per read (which is what bl did), and consume/slice are cheaper across chunks. The encode/decode round-trip benchmark runs ~4.8x faster and the incremental-decode benchmark ~4.3x faster.

The dependency is ESM-only and requires Node.js >= 22.19.0, so the CI matrix is narrowed to Node 22, 24 and 26. The browser bundle is removed entirely.

…ffer`.

DynamicBuffer reads integers without allocating a temporary slice per read
(which is what `bl` did), and `consume`/`slice` are cheaper across chunks.
The encode/decode round-trip benchmark runs ~4.8x faster and the
incremental-decode benchmark ~4.3x faster.

The dependency is ESM-only and requires Node.js >= 22.19.0, so the CI matrix
is narrowed to Node 22, 24 and 26 and the browser bundle is removed entirely.
@mcollina
mcollina merged commit 0d0c6f5 into master Oct 16, 2026
20 checks passed
@mcollina
mcollina deleted the use-platformatic-dynamic-buffer branch October 16, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant