From: Basil L. Contovounesios Date: Fri, 24 Jun 2022 09:39:02 +0000 (+0300) Subject: Reduce memory footprint of eglot--{} X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~42 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=68fbcbd6207819b9d653362e66236ea5e04e9b7d;p=emacs.git 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 --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 53ae6fae3c3..bde4a23f8e4 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."