From: Stefan Kangas Date: Thu, 22 Apr 2021 02:11:02 +0000 (+0200) Subject: Avoid lowering gc-cons-threshold X-Git-Tag: emacs-28.0.90~2783 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=71b14f28068d9327eb236b8577ccbddd65e3b38b;p=emacs.git Avoid lowering gc-cons-threshold * lisp/cedet/semantic/wisent/comp.el (wisent--compile-grammar): * lisp/international/mule-cmds.el (ucs-names): * lisp/progmodes/ebrowse.el (ebrowse-read): * test/src/coding-tests.el (benchmark-decoder): Avoid lowering gc-cons-treshold. --- diff --git a/lisp/cedet/semantic/wisent/comp.el b/lisp/cedet/semantic/wisent/comp.el index b96fa400d95..a87ed518909 100644 --- a/lisp/cedet/semantic/wisent/comp.el +++ b/lisp/cedet/semantic/wisent/comp.el @@ -3427,7 +3427,7 @@ where: (if (wisent-automaton-p grammar) grammar ;; Grammar already compiled just return it (wisent-with-context compile-grammar - (let* ((gc-cons-threshold 1000000)) + (let* ((gc-cons-threshold (max gc-cons-threshold 1000000))) (garbage-collect) (setq wisent-new-log-flag t) ;; Parse input grammar diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 578d97bcc0a..b99db46e458 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -3047,7 +3047,7 @@ on encoding." (#x1D000 . #x1FFFF) ;; (#x20000 . #xDFFFF) CJK Ideograph Extension A, B, etc, unused (#xE0000 . #xE01FF))) - (gc-cons-threshold 10000000) + (gc-cons-threshold (max gc-cons-threshold 10000000)) (names (make-hash-table :size 42943 :test #'equal))) (dolist (range ranges) (let ((c (car range)) diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index cafdb3b8289..7524c280f25 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el @@ -794,7 +794,7 @@ and TREE is a list of `ebrowse-ts' structures forming the class tree." (ebrowse-hs-version header) ebrowse-version-string)) ;; Read Lisp objects. Temporarily increase `gc-cons-threshold' to ;; prevent a GC that would not free any memory. - (let ((gc-cons-threshold 2000000)) + (let ((gc-cons-threshold (max gc-cons-threshold 2000000))) (while (not (progn (skip-chars-forward " \t\n") (eobp))) (let* ((root (read (current-buffer))) (old-root-ptr (ebrowse-class-in-tree root tree))) diff --git a/test/src/coding-tests.el b/test/src/coding-tests.el index 0bdcff22ce5..0309b2b1ad6 100644 --- a/test/src/coding-tests.el +++ b/test/src/coding-tests.el @@ -359,7 +359,7 @@ (delete-region (point-min) (point)))))) (defun benchmark-decoder () - (let ((gc-cons-threshold 4000000)) + (let ((gc-cons-threshold (max gc-cons-threshold 4000000))) (insert "Without optimization:\n") (dolist (files test-file-list) (dolist (file (cdr files))