Wilfred / difftastic

a structural diff that understands syntax 🟥🟩
https://difftastic.wilfred.me.uk/
MIT License
20.59k stars 333 forks source link

Text (exceeded DFT_GRAPH_LIMIT) #685

Closed ElijahLynn closed 6 months ago

ElijahLynn commented 6 months ago

Thanks for reporting a bug! Please include all of the following:

(1) A description of the issue. A screenshot is often helpful too.

First time trying to use difftastic and my first comparison resulted in the error:

 Text (exceeded DFT_GRAPH_LIMIT)

image

I found https://github.com/Wilfred/difftastic/issues/316 and tried setting set --export DFT_GRAPH_LIMIT 5000000 (fish) but no go on resolving this.

(2) A copy of what you're diffing. If you're diffing files, include the before and after files. If you're using difftastic with a VCS repository (e.g. git), include the URL and commit hash.

I can't share the files unfortunately.

(3) The version of difftastic you're using (see difft --version) and your operating system.

difft --version
Difftastic 0.56.1 (built with rustc 1.76.0)
ElijahLynn commented 6 months ago

https://github.com/Wilfred/difftastic/blob/b3732b9ebb66752f6ab9fbc289d0c7e0396fd536/src/main.rs#L601-L610

ElijahLynn commented 6 months ago

Should pull an ENV variable per this: https://github.com/Wilfred/difftastic/blob/b3732b9ebb66752f6ab9fbc289d0c7e0396fd536/src/options.rs#L270-L279

I need to figure out how to test it is taking my new value in fish.

ElijahLynn commented 6 months ago

K, got it working with one more zero, bumping it to 50 million, instead of 5 million.

set --export DFT_GRAPH_LIMIT 50000000
Wilfred commented 6 months ago

Note that DFT_GRAPH_LIMIT is proportional to the amount of memory used, so I don't want to 10x the default value here.

I think this is working as intended.