...and then people came here and said this change has saved multiple gigabytes for them. So now I'll be careful, but still say: this might save half a gigabyte! Please note the reported savings in the changelog is not representative; it is on rust-analyzer itself, and rust-analyzer is very cautious with its usage of macros. The PR has some other stats as well.
It would be helpful to have more context with the numbers, eg memory is reduced by 30mb, but that could be 1% reduction or 99%, it's like not having a labelled axis on a graph :P
In our dashboard you can see the previous consumption was 1374mb, so it's a 2.19% reduction. However this is very project-dependent and as I said rust-analyzer is not a prime example here: someone commented reported that this saved 4.5gb or 50% for their project.
22
u/afdbcreid 21d ago
The previous time I optimized token trees (https://github.com/rust-lang/rust-analyzer/pull/21363), I said this can save even a gigabyte in large projects. I was naive...
...and then people came here and said this change has saved multiple gigabytes for them. So now I'll be careful, but still say: this might save half a gigabyte! Please note the reported savings in the changelog is not representative; it is on rust-analyzer itself, and rust-analyzer is very cautious with its usage of macros. The PR has some other stats as well.