<execvy@gmail.com> writes:
> After I change `mps_gen_param_s gens[] = { { 128000, 0.8 }, { 5 * 128000, 0.4
} };`
> to `mps_gen_param_s gens[] = { { 12800000, 0.8 }, { 5 * 12800000, 0.4 } };`,
the Emacs never crash again.
That's still a very large size for the initial generation, in
particular. May I ask why you decided to do that? I think for
interactive use, you want to keep the initial generation reasonably
small.
> And it's RES mem is 2661M, I think it's good, I'm editing 2000 rust files in
Emacs with rust-analyzer lsp server. 99% of time I don't feel GC's lag.
> But, When I hit `Ctrl + right click`, I feel a very long GC lag ( > 10
seconds). It's reproducible.
Are we sure that it's GC causing this? I assume control + right click
shows a buffer menu, so it builds a list of all buffers, and you have a
lot of them...
I've played around a little creating 10,000 buffers and showing the
buffer menu, and there does appear to be some lag, but this is true both
with and without MPS. I also tried a build with --with-x-toolkit=no,
and that seemed to have less lag.
> So I profiler-start, then `Ctrl + right click`, then `profiler-stop`, got:
> ```
> 14726 58% Automatic GC
> 10528 41% - help-command-error-confusable-suggestions
> 10528 41% - debug
> 10528 41% - recursive-edit
> 391 1% - substitute-command-keys
I cannot tell from this whether MPS was called once and took a very long
time to run, or was called many times and the problem lies elsewhere.
Does the problem happen with the default generation sizes?
Pip