Performance fixture: real-world Rust file pair from tauri-apps/tauri (examples/api/src-tauri/build.rs, commit a16796a55592cf5be80043edfbb630dd2e32efab) that takes diff_code roughly 650ms despite a combined AST size of only 907 nodes. Captured via research/diff_pairs_benchmark_rust.csv; useful for regression-testing and profiling diff_code's worst-case behavior on small/medium real-world inputs.

Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–13 unchanged (13 lines)
14 tauri_build::InlinedPlugin::new().commands(&["toggle", "popup"]),
15 )
16 .app_manifest(tauri_build::AppManifest::new().commands(&[
17 "log_operation",
18 "perform_request",
19 "echo",
20 ])),
21 )
22 .expect("failed to run tauri-build");
23
24 // workaround needed to prevent `STATUS_ENTRYPOINT_NOT_FOUND` error in tests
25 // see https://github.com/tauri-apps/tauri/pull/4383#issuecomment-1212221864
26 let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
…lines 27–52 unchanged (26 lines)

After

…lines 1–13 unchanged (13 lines)
14 tauri_build::InlinedPlugin::new().commands(&["toggle", "popup"]),
15 )
16 .app_manifest(tauri_build::AppManifest::new().commands(&[
17 "log_operation",
18 "perform_request",
19 "echo",
20 "spam",
21 ])),
22 )
23 .expect("failed to run tauri-build");
24
25 // workaround needed to prevent `STATUS_ENTRYPOINT_NOT_FOUND` error in tests
26 // see https://github.com/tauri-apps/tauri/pull/4383#issuecomment-1212221864
…lines 27–53 unchanged (27 lines)

Before

source_file
line_comment
// "//"
line_comment
// "//"
line_comment
// "//"
use_declaration
use "use"
scoped_identifier
identifier "tauri_build"
:: "::"
identifier "WindowsAttributes"
; ";"
function_item
fn "fn"
identifier "main"
parameters
( "("
) ")"
block
{ "{"
expression_statement
call_expression
field_expression
call_expression
scoped_identifier
identifier "tauri_build"
:: "::"
identifier "try_build"
arguments
( "("
call_expression
field_expression (+92 nodes collapsed)
arguments
( "("
call_expression
field_expression
call_expression
scoped_identifier
scoped_identifier
identifier "tauri_build"
:: "::"
identifier "AppManifest"
:: "::"
identifier "new"
arguments
( "("
) ")"
. "."
field_identifier "commands"
arguments
( "("
reference_expression
& "&"
array_expression
[ "["
string_literal
" "\""
string_content "log_operation"
" "\""
, ","
string_literal
" "\""
string_content "perform_request"
" "\""
, ","
string_literal
" "\""
string_content "echo"
" "\""
, ","
] "]"
) ")"
) ")"
, ","
) ")"
. "."
field_identifier "expect"
arguments
( "("
string_literal
" "\""
string_content "failed to run tauri-build"
" "\""
) ")"
; ";"
line_comment
// "//"
line_comment
// "//"
let_declaration (+27 nodes collapsed)
let_declaration
let "let"
identifier "target_env"
= "="
call_expression
scoped_identifier
scoped_identifier
identifier "std"
:: "::"
identifier "env"
:: "::"
identifier "var"
arguments
( "("
string_literal
" "\""
string_content "CARGO_CFG_TARGET_ENV"
" "\""
) ")"
; ";"
let_declaration (+42 nodes collapsed)
expression_statement (+44 nodes collapsed)
} "}"
function_item (+135 nodes collapsed)

After

source_file
line_comment
// "//"
line_comment
// "//"
line_comment
// "//"
use_declaration
use "use"
scoped_identifier
identifier "tauri_build"
:: "::"
identifier "WindowsAttributes"
; ";"
function_item
fn "fn"
identifier "main"
parameters
( "("
) ")"
block
{ "{"
expression_statement
call_expression
field_expression
call_expression
scoped_identifier
identifier "tauri_build"
:: "::"
identifier "try_build"
arguments
( "("
call_expression
field_expression (+92 nodes collapsed)
arguments
( "("
call_expression
field_expression
call_expression
scoped_identifier
scoped_identifier
identifier "tauri_build"
:: "::"
identifier "AppManifest"
:: "::"
identifier "new"
arguments
( "("
) ")"
. "."
field_identifier "commands"
arguments
( "("
reference_expression
& "&"
array_expression
[ "["
string_literal
" "\""
string_content "log_operation"
" "\""
, ","
string_literal
" "\""
string_content "perform_request"
" "\""
, ","
string_literal
" "\""
string_content "echo"
" "\""
, ","
string_literal
" "\""
string_content "spam"
" "\""
, ","
] "]"
) ")"
) ")"
, ","
) ")"
. "."
field_identifier "expect"
arguments
( "("
string_literal
" "\""
string_content "failed to run tauri-build"
" "\""
) ")"
; ";"
line_comment
// "//"
line_comment
// "//"
let_declaration (+27 nodes collapsed)
let_declaration
let "let"
identifier "target_env"
= "="
call_expression
scoped_identifier
scoped_identifier
identifier "std"
:: "::"
identifier "env"
:: "::"
identifier "var"
arguments
( "("
string_literal
" "\""
string_content "CARGO_CFG_TARGET_ENV"
" "\""
) ")"
; ";"
let_declaration (+42 nodes collapsed)
expression_statement (+44 nodes collapsed)
} "}"
function_item (+135 nodes collapsed)