]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid lowering gc-cons-threshold
authorStefan Kangas <stefan@marxist.se>
Thu, 22 Apr 2021 02:11:02 +0000 (04:11 +0200)
committerStefan Kangas <stefan@marxist.se>
Thu, 22 Apr 2021 02:11:02 +0000 (04:11 +0200)
* 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.

lisp/cedet/semantic/wisent/comp.el
lisp/international/mule-cmds.el
lisp/progmodes/ebrowse.el
test/src/coding-tests.el

index b96fa400d950c7404a176851a36c3bc726013dc2..a87ed51890938b4b5a930fe4f0f5ed8a07f668bb 100644 (file)
@@ -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
index 578d97bcc0a62d1b0a02846f6c99ceca577cd895..b99db46e4582eda6b0685edc4f42830ba06fe0aa 100644 (file)
@@ -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))
index cafdb3b828974277f0ae499578469952799c2d00..7524c280f258f788d197bdb9cc77d6011ec7fd19 100644 (file)
@@ -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)))
index 0bdcff22ce5d12a11678eefe9913ed00af162695..0309b2b1ad658b513cc3a711755816f0d556dafe 100644 (file)
        (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))