emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/eglot2emacs 68fbcbd620 076/120: Reduce memory footprint of eglot


From: João Távora
Subject: feature/eglot2emacs 68fbcbd620 076/120: Reduce memory footprint of eglot--{}
Date: Thu, 20 Oct 2022 07:16:58 -0400 (EDT)

branch: feature/eglot2emacs
commit 68fbcbd6207819b9d653362e66236ea5e04e9b7d
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: GitHub <noreply@github.com>

    Reduce memory footprint of eglot--{}
    
    * eglot.el (eglot--{}): Specify smallest hash table :size, to spare
    ~1KiB according to memory-report-object-size.
    
    See also https://github.com/joaotavora/eglot/pull/315.
    
    GitHub-reference: per https://github.com/joaotavora/eglot/issues/978
---
 lisp/progmodes/eglot.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 53ae6fae3c..bde4a23f8e 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -368,7 +368,7 @@ This can be useful when using docker to run a language 
server.")
   `((1 . eglot-diagnostic-tag-unnecessary-face)
     (2 . eglot-diagnostic-tag-deprecated-face)))
 
-(defconst eglot--{} (make-hash-table) "The empty JSON object.")
+(defconst eglot--{} (make-hash-table :size 1) "The empty JSON object.")
 
 (defun eglot--executable-find (command &optional remote)
   "Like Emacs 27's `executable-find', ignore REMOTE on Emacs 26."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]