bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#38345: 27.0.50; Permanent increase in memory consumption after openi


From: Ihor Radchenko
Subject: bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs)
Date: Sat, 23 Nov 2019 22:37:44 +0800

Recently, I have noticed that my emacs tends to increase its memory
usage up to over 1.5Gb after I open a large number of pdf documents. It
is understandable since some of the pdfs can be quite large. However,
the problem is that the memory does not seem to be released even after I
close all the pdf buffers.

First, I though that the issue is with pdf-tools and reported my problem
there (https://github.com/politza/pdf-tools/issues/177). However, the
memory consumption problem appears to happen even if I just open images.

I monitored emacs (emacs -Q) memory usage with 
https://github.com/dkogan/memory_leak_instrumentation

If I open a large (>250) photos using the code below, the memory usage
increases permanently even after I close all the image buffers and wait
for some time. 

#+begin_src emacs-lisp
(setq large-file-warning-threshold nil)
(setq image-cache-eviction-delay 5)
(find-file "~/Tosort/pictures&photos/*.jpg" 'wild)
(mapc #'kill-buffer (seq-filter (apply-partially #'string-match ".+.jpg$") 
(mapcar #'buffer-name (buffer-list))))
(clear-image-cache t)
(garbage-collect)
#+end_src

The attached is memory consumption plot I got after running M-x
eval-buffer on the code above several times (each run correspond to the
memory consumption peak on the plot).

Regards,
Ihor

in GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 
1.16.0)
 of 2019-11-21 built on yantar92-laptop
Repository revision: 1805b4cc08c8f9668f0f43f5b157d91b9c757e88
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12005000
System Description: Gentoo/Linux






reply via email to

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