No description
Find a file
Sebastian Sturm 91616abdb0 Initialize state->error_buffer_read
random values of state->error_buffer_read might otherwise
cause memory corruption as we write beyond the stderr receive
buffer, or (if state->error_buffer_read > ERROR_BUFFER_SIZE),
the size argument to recv might overflow to very large unsigned
values, causing the recv call to fail (and hence causing spsupr
to reattempt reading from the stderr fd indefinitely)
2023-05-07 15:13:36 -05:00
admin ; * admin/charsets/mapconv (LC_ALL): Fix typo. 2023-04-27 18:51:40 +08:00
build-aux ; Use a Bourne shell-compatible form for command substitution 2023-05-04 22:44:40 -07:00
doc Allow X-Message-SMTP-Method to include more MTAs 2023-05-06 09:05:28 +08:00
etc Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2023-05-06 03:59:59 +03:00
leim Allow inserting #x6A58 using chinese-ctlaub IM 2023-04-25 17:39:23 +03:00
lib Update from Gnulib by running admin/merge-gnulib 2023-03-10 16:53:07 -08:00
lib-src Fix compilation of lib-src/movemail 2023-03-22 17:26:22 +02:00
lisp ; Fix last change 2023-05-06 22:27:55 +02:00
lwlib Fix dependency bug when building lwlib 2023-01-13 23:39:51 -08:00
m4 Update from Gnulib by running admin/merge-gnulib 2023-03-10 16:53:07 -08:00
modules ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
msdos Bump Emacs version to 29.0.90 2023-04-10 01:15:30 -04:00
nextstep ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
nt Bump Emacs version to 29.0.90 2023-04-10 01:15:30 -04:00
oldXMenu ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
src Initialize state->error_buffer_read 2023-05-07 15:13:36 -05:00
test Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2023-05-06 03:59:59 +03:00
.clang-format [POC] Initial implementation 2023-05-07 15:13:35 -05:00
.dir-locals.el Add indentation style setting for c-ts-mode in .dir-locals.el 2023-04-22 09:41:50 +03:00
.gitattributes ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
.gitignore [POC] Initial implementation 2023-05-07 15:13:35 -05:00
.gitlab-ci.yml ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
.mailmap * .mailmap: Fixes for Emacs 29. 2022-09-28 16:48:10 +02:00
autogen.sh Add Git hooks to check filenames listed in the commit message 2023-04-20 21:40:02 -07:00
BUGS Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
ChangeLog.1 ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
ChangeLog.2 ; Fix typos 2023-02-12 03:23:41 +01:00
ChangeLog.3 Merge from origin/emacs-29 2023-02-21 10:27:27 +01:00
ChangeLog.4 Merge from origin/emacs-29 2023-04-15 12:44:48 -04:00
config.bat ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
configure.ac Improve portability of pkg-config tests. 2023-04-25 20:41:05 +08:00
CONTRIBUTE Merge from origin/emacs-29 2023-04-15 13:05:04 -04:00
COPYING Merge from Gnulib 2017-10-01 18:31:10 -07:00
GNUmakefile ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
INSTALL ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
INSTALL.REPO Prefer https: to git: URIs 2023-02-04 15:14:15 -08:00
make-dist ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
Makefile.in Fix portability problem in toplevel Makefile 2023-05-06 20:42:22 +08:00
README Bump Emacs version to 29.0.90 2023-04-10 01:15:30 -04:00
readme.md [POC] Initial implementation 2023-05-07 15:13:35 -05:00

Emacs for lsp-mode(POC)

A Emacs fork implementing non-blocking and async JSONRPC support

Motivation

The fork aims to fix the strugle of lsp-mode with sync Emacs core and json handling

How it works?

The fork uses separate emacs threads to run the processing and then runs release_global_lock() from the C code when the processing does not involve lisp objects. There are a lot of benefits from this approach:

  • UI does not block the server. Imagine that currently you have font lock running. In stock emacs that will prevent reading the process intput even if the server has alredy sent the response to the client. Note that this will improve not only emacs performance but it will improve the performance of single threaded server because the server won't be blocked to wait for IO to be read by the client.

  • Server does not block the UI. Similarly, the processing of lsp-mode serialization of requests/deserialization of responses does block UI processing. Only small portion of whole JSONRPC

  • Server being slow reading requests does not block the UI . In stock emacs sending requests to the server will force emacs to wait for server to read the request.

  • Less garbage. Since a lot of the processing does not involve lisp objects we generate less garbage and as a result the GC runs less often.

Current state

The code runs fine with most of the servers I have tested with. Only Linux/Unix is supported for now.

How to use?

Compile emacs just like normal emacs and then use the latest version of lsp-mode.

Acknowledgments

Thanks to 606u for helping me out with low level process communication code