Skip to content

Commit 7e58228

Browse files
KnorpelSenfbartlomiejuclaude
authored
perf(fmt): speed up file diffing (#30644)
This swaps out dissimilar for imara which is substantially faster at diffing strings. Note that this is a proof of concept and I did not have enough time to make the output pretty. I just shows that the diff is fast. Applying colors should be doable without changing much about the perf. I'm willing to fix this up if I get an OK about the general direction. Fixes #30634 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 92ca1fe commit 7e58228

14 files changed

Lines changed: 191 additions & 137 deletions

Cargo.lock

Lines changed: 13 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ dprint-plugin-markdown = "=0.20.0"
362362
dprint-plugin-typescript = "=0.95.15"
363363
env_logger = "=0.11.6"
364364
fancy-regex = "=0.14.0"
365+
imara-diff = "=0.2.0"
365366
libsui = "0.12.6"
366367
malva = "=0.12.1"
367368
markup_fmt = "=0.22.0"

libs/resolver/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ deno_permissions = { workspace = true, optional = true }
4949
deno_semver.workspace = true
5050
deno_terminal.workspace = true
5151
deno_unsync.workspace = true
52-
dissimilar.workspace = true
5352
futures.workspace = true
5453
http = { workspace = true, optional = true }
54+
imara-diff.workspace = true
5555
import_map.workspace = true
5656
indexmap.workspace = true
5757
jsonc-parser.workspace = true

0 commit comments

Comments
 (0)