Giter VIP home page Giter VIP logo

mattiasdrp / emacs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from emacs-mirror/emacs

0.0 0.0 0.0 1.33 GB

Mirror of GNU Emacs

Home Page: http://www.gnu.org/software/emacs/

License: GNU General Public License v3.0

Shell 0.19% JavaScript 0.08% Ruby 0.11% C++ 0.41% Scheme 0.01% Python 0.11% Perl 0.15% C 21.53% PHP 0.04% Emacs Lisp 76.25% Erlang 0.01% Objective-C 0.82% Java 0.01% Lua 0.01% Smalltalk 0.05% Fortran 0.01% Go 0.01% Ada 0.05% Prolog 0.08% MATLAB 0.08%

emacs's Introduction

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

emacs's People

Contributors

rgmorris avatar eli-zaretskii avatar monnier avatar eggert avatar larsmagne avatar lektu avatar albinus avatar loveshack avatar skangas avatar link0ff avatar snogglethorpe avatar jimblandy avatar andreas-schwab avatar andreacorallo avatar jave avatar mituharu avatar dgutov avatar belanger avatar joaotavora avatar mattiase avatar paveljanik avatar dmantipov avatar yamaoka avatar npostavs avatar phst avatar eric-s-raymond avatar wohler avatar sam-s avatar drmirror avatar leoliu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.