perf: swap pixelmatch for @blazediff/core#1195
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 8df9dc3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
|
|
|
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). |
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