[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: |
Thu, 28 Nov 2019 09:38:34 +0800 |
> Please see also the recent discussion in
> https://debbugs.gnu.org/38187#95
Thanks.
Similar to that discussion, I tried to force clearing the image cache
after killing each image buffer.
#+begin_sec emacs-lisp
(dolist (file (directory-files "~/Tosort/pictures&photos/" 'full ".*jpg"))
(find-file file)
(mapc #'kill-buffer (seq-filter (apply-partially #'string-match ".+.jpg$")
(mapcar #'buffer-name (buffer-list))))
(garbage-collect)
(clear-image-cache t))
#+end_src
The resulting memory consumption graph is attached.
The memory increase almost disappeared (remaining heap size becomes
~40Mb in comparison ~400Mb in the version with just garbage collect).
Just calling (clear-image-cache) after cycling over opening/killing
the image buffers still results in ~400Mb (it has no effect, basically).
The above result is confusing since the all the code I tried to run so
far had (setq image-cache-eviction-delay 5). Since, cycling over all the
images usually took >1min, cache clearing supposed to happen at least
several times during opening/killing the image buffers.
To understand further, I tried to disable automatic cache clearing
completely (setq image-cache-eviction-delay 5000). The resulting memory
consumption is ~400Mb, but a few tens of Mb higher in comparison with
(setq image-cache-eviction-delay 5).
It appears to me that clearing image cache has some problem when there
is a relatively large number of images in the cache already.
Regards,
Ihor
images-seq-flush.png
Description: PNG image
Juri Linkov <juri@linkov.net> writes:
>> Thanks for the links. I got to know more about memory management now.
>> Now, it is clear why the memory is consumption is so high when I open a
>> bunch of images at the same time. However, it still does not explain my
>> observations during usual workflow.
>
> Please see also the recent discussion in
> https://debbugs.gnu.org/38187#95
- bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), (continued)
- bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Eli Zaretskii, 2019/11/23
- bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Ihor Radchenko, 2019/11/23
- bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Eli Zaretskii, 2019/11/23
- bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Ihor Radchenko, 2019/11/23
- bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Eli Zaretskii, 2019/11/23
bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Eli Zaretskii, 2019/11/25
bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Eli Zaretskii, 2019/11/28
bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Ihor Radchenko, 2019/11/28
bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs), Eli Zaretskii, 2019/11/28