Skip to content

Commit

Permalink
doc/Makefile: Limit memory consumption when generating docs
Browse files Browse the repository at this point in the history
* doc/Makefile: Do not disable garbage collection completely (as it
was after 3684c79) when generating docs.  Use no too large 50Mb
`gc-cons-threshold' instead.

See
https://yhetil.org/emacs-devel/9778F176-E724-4E61-B0FB-327BCDD316C0@acm.org
for the testing behind the 50Mb constant.
  • Loading branch information
yantar92 committed Jun 17, 2022
1 parent e9da29b commit 41b7410
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,24 @@ guide:: orgguide.texi org-version.inc
../mk/guidesplit.pl $@/*
endif

# We increase GC threshold when generating documentation. This
# imrpoves the performance significantly. See
# https://yhetil.org/emacs-devel/9778F176-E724-4E61-B0FB-327BCDD316C0@acm.org
# Too high number may cause memory overflow (for example, it has
# happened in CI during automated build). We choose 50Mb threshold,
# based on the above discussion.
org.texi: org-manual.org
$(BATCH) \
--eval '(add-to-list `load-path "../lisp")' \
--eval '(load "../mk/org-fixup.el")' \
--eval '(setq gc-cons-threshold most-positive-fixnum)' \
--eval '(setq gc-cons-threshold (* 50 1000 1000))' \
--eval '(org-make-manual)'

orgguide.texi: org-guide.org
$(BATCH) \
--eval '(add-to-list `load-path "../lisp")' \
--eval '(load "../mk/org-fixup.el")' \
--eval '(setq gc-cons-threshold most-positive-fixnum)' \
--eval '(setq gc-cons-threshold (* 50 1000 1000))' \
--eval '(org-make-guide)'

org-version.inc: org.texi
Expand Down

0 comments on commit 41b7410

Please sign in to comment.