From: Danny YUE <sheepduke@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Emacs eats up my memory while viewing images
Date: Fri, 09 Jun 2017 00:06:49 +0800 [thread overview]
Message-ID: <87k24mh3ae.fsf@gmail.com> (raw)
In-Reply-To: <837f0m8qjp.fsf@gnu.org>
On 2017-06-08 15:09, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Danny YUE <sheepduke@gmail.com>
>> Date: Thu, 08 Jun 2017 19:58:03 +0800
>>
>> I was viewing some (well, lots of) old images using image+ in Emacs.
>> Then I noticed that it opens new image slower and slower.
>> I ran command `free -h` and noticed that my memory was almost totally
>> consumed.
>> Then I killed Emacs and memory consumption dropped to normal level.
>>
>> I suspect there is something wrong with it, because when I press "N" for
>> `image-next-file`, the old image file is removed from buffer list, thus
>> the memory consumed by it *should* be released...
>
> The memory isn't released immediately because Emacs caches images for
> better performance. And even if Emacs does free the memory used for
> the image and its buffer, it doesn't necessarily return that memory to
> the OS; that depend on the build and the OS you are using.
>
> Try the command "M-x clear-image-cache". If that helps, you may wish
> to customize your value of image-cache-eviction-delay.
In fact `clear-image-cache` is not really an interactive command, it is
a function.
The current value of `image-cache-eviction-delay` is 300.
I will try to set it to a smaller value and have a try.
Thanks.
Danny
next prev parent reply other threads:[~2017-06-08 16:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-08 11:58 Emacs eats up my memory while viewing images Danny YUE
2017-06-08 14:54 ` Alexis
2017-06-08 15:54 ` Danny YUE
2017-06-08 15:09 ` Eli Zaretskii
2017-06-08 16:06 ` Danny YUE [this message]
2017-06-08 16:14 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k24mh3ae.fsf@gmail.com \
--to=sheepduke@gmail.com \
--cc=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.