Skip to content

Conversation

@lionel-
Copy link
Contributor

@lionel- lionel- commented Feb 24, 2025

Branched from #719.
Addresses posit-dev/positron#5050

By default each tokio worker thread gets 2mb of stack space. This PR reduces the number of threads used by tokio:

  • Use a single worker thread in the help proxy server
  • Use two worker threads in the LSP as well as 2 blocking threads for diagnostics

With these changes I get from 124 mb to 114mb.

Screenshot 2025-02-24 at 11 35 58

In principle it would make sense to have the proxy server share the runtime with the LSP but probably not worth doing this work since we plan for the LSP to move from tower-lsp to lsp-server, at which point it will no longer rely on tokio.

@lionel- lionel- changed the title Task/parsimonious threads Use fewer threads to spare memory Feb 24, 2025
@lionel- lionel- requested a review from DavisVaughan February 24, 2025 10:44
@lionel- lionel- merged commit b13898a into task/reparse-lazily Feb 25, 2025
5 of 6 checks passed
@lionel- lionel- deleted the task/parsimonious-threads branch February 25, 2025 09:39
@github-actions github-actions bot locked and limited conversation to collaborators Feb 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants