Skip to content

Commit 3c1085b

Browse files
authored
Add +swbt none to remove busy-wait and improve performance (#331)
* Add +swbt none to remove busy-wait and improve performance Utilizing busy-wait to reduce latency primarily makes sense for applications that are running as the only node on the machine. So it doesn't make sense for ElixirLS because there will usually be other processes running on the machine such as the editor and potentially other ElixirLS instances. A blog post that touches on `+swbt none`: https://www.ably.io/blog/beam-optimization-mqtt/ Also add sbwtdcpu and sbwtdio Fixes #328 * Add +sbwt none to .bat files also * Update changelog
1 parent 682c28d commit 3c1085b

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Potentially breaking changes:
55

66
Improvements:
77
- Use ElixirSense's error tolerant parser for document symbols (thanks [Łukasz Samson](https://github.com/lukaszsamson)) [#322](https://github.com/elixir-lsp/elixir-ls/pull/322)
8+
- Disable busy-wait in BEAM to reduce CPU usage (thanks [Jason Axelson](https://github.com/axelson)) [#331](https://github.com/elixir-lsp/elixir-ls/pull/331)
89

910
House keeping:
1011
- Fix the link in the README to releases (thanks [RJ Dellecese](https://github.com/rjdellecese)) [#312](https://github.com/elixir-lsp/elixir-ls/pull/312)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
@echo off & setlocal enabledelayedexpansion
22

33
SET ERL_LIBS=%~dp0;%ERL_LIBS%
4-
elixir -e "ElixirLS.Debugger.CLI.main()"
4+
elixir --erl "+sbwt none +sbwtdcpu none +sbwtdio none" -e "ElixirLS.Debugger.CLI.main()"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
@echo off & setlocal enabledelayedexpansion
22

33
SET ERL_LIBS=%~dp0;%ERL_LIBS%
4-
elixir -e "ElixirLS.LanguageServer.CLI.main()"
4+
elixir --erl "+sbwt none +sbwtdcpu none +sbwtdio none" -e "ElixirLS.LanguageServer.CLI.main()"

apps/elixir_ls_utils/priv/launch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ SCRIPT=$(readlink_f "$0")
6363
SCRIPTPATH=$(dirname "$SCRIPT")
6464
export ERL_LIBS="$SCRIPTPATH:$ERL_LIBS"
6565

66-
exec elixir -e "$ELS_SCRIPT"
66+
exec elixir --erl "+sbwt none +sbwtdcpu none +sbwtdio none" -e "$ELS_SCRIPT"

0 commit comments

Comments
 (0)