@QuarticCat observed that popping delimiters is unnecessary, and saw a
speedup in PR #401. This reduces the number of nodes in typical graphs
by ~20%, reducing runtime and memory usage.
This works because there is only one thing we can do at the end of a
list: pop the delimiter. The syntax node on the other side does not
give us more options, we have at most one. Popping all the delimiters
as soon as possible is equivalent, and produces the same graph route.
This change has also slightly changed the output of
samples_files/slow_after.rs, producing a better (more minimal)
diff. This is probably luck, due to the path-dependent nature of the
route solving logic, but it's a positive sign.
A huge thanks to @QuarticCat for their contributions, this is a huge
speedup.
Co-authored-by: QuarticCat <QuarticCat@pm.me>
This helps skimming the results when multiple files are changed with
multiple hunks. It makes the file changing more prominent than just
going from e.g. 5/5 to 1/10.
Fixes#400
Acked-by: Wilfred Hughes <me@wilfred.me.uk>
Right now `cargo binstall` cannot find the pre-compiled `difftastic`
assets:
```
~
❯ cargo binstall difftastic
INFO resolve: Resolving package: 'difftastic'
WARN resolve: The package will be installed from source (with cargo)
Do you wish to continue? yes/[no]
? no
WARN Installation cancelled
~ took 18s
❯ cargo binstall difftastic --pkg-url="{ repo }/releases/download/{ version }/difft-{ target }.{ archive-format }"
INFO resolve: Resolving package: 'difftastic'
WARN resolve: The package will be downloaded from github.com
INFO resolve: This will install the following binaries:
INFO resolve: - difft (difft -> /home/michel/.cargo/bin/difft-v0.38.0)
INFO resolve: And create (or update) the following symlinks:
INFO resolve: - difft (/home/michel/.cargo/bin/difft -> difft-v0.38.0)
Do you wish to continue? yes/[no]
? yes
INFO install: Installing binaries...
INFO Done in 9.277840305s
```
Adding this `pkg-url` override to `Cargo.toml` allows `binstall` to find
the pre-compiled archives:
```
~
❯ cargo binstall --manifest-path ~/src/github/Wilfred/difftastic/Cargo.toml difftastic
INFO resolve: Resolving package: 'difftastic'
INFO resolve: difftastic v0.38.0 is already installed, use --force to override
INFO Done in 5.327886ms
~
❯ cargo binstall --manifest-path ~/src/github/Wilfred/difftastic/Cargo.toml difftastic --force
INFO resolve: Resolving package: 'difftastic'
WARN resolve: The package will be downloaded from github.com
INFO resolve: This will install the following binaries:
INFO resolve: - difft (difft -> /home/michel/.cargo/bin/difft-v0.38.0)
INFO resolve: And create (or update) the following symlinks:
INFO resolve: - difft (/home/michel/.cargo/bin/difft -> difft-v0.38.0)
Do you wish to continue? yes/[no]
? yes
INFO install: Installing binaries...
INFO Done in 5.484314255s
```
Signed-off-by: Michel Alexandre Salim <michel@michel-slm.name>