Skip to content

perf: swap pixelmatch for @blazediff/core#1195

Open
teimurjan wants to merge 1 commit into
webdriverio:mainfrom
teimurjan:swap-pixelmatch-blazediff-core
Open

perf: swap pixelmatch for @blazediff/core#1195
teimurjan wants to merge 1 commit into
webdriverio:mainfrom
teimurjan:swap-pixelmatch-blazediff-core

Conversation

@teimurjan

Copy link
Copy Markdown

What: Swap pixelmatch for @blazediff/core in the headless golden-PNG comparison path.

Why: Identical pixel-diff results, ~1.5x faster, zero dependencies.

How: Drop-in replacement. Same call signature and threshold option, no logic changes.

Notes: @blazediff/core is already used by Vitest, Shopify, Ant Design, Vega, and ApexCharts.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8df9dc3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@wdio/image-comparison-core Patch
@wdio/visual-service Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@linux-foundation-easycla

linux-foundation-easycla Bot commented Jul 20, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: teimurjan / name: Teimur Gasanov (8df9dc3)

@wswebcreation

Copy link
Copy Markdown
Member

Tnx for the PR, but why should we move to a different core now, what is the impact, will everything still work and so one

Please provide some more context for this change, this now feels like a simple with no context generated Claude PR

@teimurjan

Copy link
Copy Markdown
Author

Tnx for the PR, but why should we move to a different core now, what is the impact, will everything still work and so one

Please provide some more context for this change, this now feels like a simple with no context generated Claude PR

Hey!

Yeah, my bad, I used Claude because considered it a routine change.

BlazeDiff is the fastest image diff group of packages right now. The core is pure JS, 100% return value match with pixelmatch. But, it uses a more performant block-based algorithm that skips redundant work. The result is ~60% performance boost (benchmarks.

It's already widely used (Vitest, Ant Group, Shopify) with 5M weekly downloads: https://www.npmjs.com/package/@blazediff/core.

TLDR: blazediff/core gives you ~60% performance boost in diffs while having 1-1 API and results match with pixelmatch (+ it has zero dependencies, so smaller chance of supply chain attack).

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.

2 participants