unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alan Third <alan@idiocy.org>
Cc: larsi@gnus.org, stefan@marxist.se, 38187@debbugs.gnu.org,
	juri@linkov.net
Subject: bug#38187: 27.0.50; No mouse-wheel scaling on images
Date: Fri, 22 Nov 2019 15:26:42 +0200	[thread overview]
Message-ID: <8336egvy7h.fsf@gnu.org> (raw)
In-Reply-To: <20191122103300.GA4888@breton.holly.idiocy.org> (message from Alan Third on Fri, 22 Nov 2019 10:33:00 +0000)

> Date: Fri, 22 Nov 2019 10:33:00 +0000
> From: Alan Third <alan@idiocy.org>
> Cc: larsi@gnus.org, 38187@debbugs.gnu.org, stefan@marxist.se,
> 	juri@linkov.net
> 
> > > A simple ‘solution’ to the mousewheel scaling issue would be to
> > > explicitly flush the old image from the cache on each change. I think
> > > that’s what image mode does when you zoom.
> > 
> > image-mode can do that when it knows the scaled image will replace the
> > previous one, yes.  (We will need to add an API for that, I think.)
> > But that's not cache eviction, that's application being smarter about
> > the "garbage" it produces.
> 
> Actually, now I look at the code, when an image is resized using the
> mousewheel the previous image should already be flushed.
> 
> In image.el we have this function:
> 
> (defun image--get-imagemagick-and-warn ()
>   (unless (or (fboundp 'imagemagick-types) (image-transforms-p))
>     (error "Cannot rescale images on this terminal"))
>   (let ((image (image--get-image)))
>     (image-flush image)    ;;; <<---------------
>     (when (and (fboundp 'imagemagick-types)
>                (not (image-transforms-p)))
>       (plist-put (cdr image) :type 'imagemagick))
>     image))
> 
> which is called every time an image is resized. So perhaps I
> misunderstand what image-flush does, or we do have a memory leak?

Strange indeed.  I suggest to step in a debugger through this and
other relevant code in this scenario, and see what happens there.  I'd
be surprised to know that we have a memory leak in this area.





  reply	other threads:[~2019-11-22 13:26 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-12 20:38 bug#38187: 27.0.50; No mouse-wheel scaling on images Juri Linkov
2019-11-14 12:48 ` Eli Zaretskii
2019-11-17 10:04   ` Lars Ingebrigtsen
2019-11-17 16:05     ` Eli Zaretskii
2019-11-17 16:07       ` Lars Ingebrigtsen
2019-11-17 21:20         ` Stefan Kangas
2019-11-17 22:42           ` Juri Linkov
2019-11-18  9:10             ` Lars Ingebrigtsen
2019-11-18 21:37               ` Juri Linkov
2019-11-19  3:31                 ` Eli Zaretskii
2019-11-20 23:00                   ` Juri Linkov
2019-11-21  3:35                     ` Eli Zaretskii
2019-11-21 21:18                     ` Alan Third
2019-11-21 22:51                       ` Juri Linkov
2019-11-22  7:47                         ` Eli Zaretskii
2019-11-21 21:26                     ` Lars Ingebrigtsen
2019-11-21 22:57                       ` Juri Linkov
2019-11-21 23:10                         ` Lars Ingebrigtsen
2019-11-22  7:58                           ` Eli Zaretskii
2019-11-22  7:51                         ` Eli Zaretskii
2019-11-22  7:31                       ` Eli Zaretskii
2019-11-22 12:41                         ` Lars Ingebrigtsen
2019-11-22  9:50                       ` Alan Third
2019-11-22 10:04                         ` Eli Zaretskii
2019-11-22 10:33                           ` Alan Third
2019-11-22 13:26                             ` Eli Zaretskii [this message]
2019-11-19  8:09                 ` Lars Ingebrigtsen
2019-11-20 23:12                   ` Juri Linkov
2019-11-21 12:11                     ` Lars Ingebrigtsen
2019-11-21 14:25                       ` Eli Zaretskii
2019-11-21 22:45                         ` Juri Linkov
2019-11-23 22:23                       ` Juri Linkov
2019-11-27 11:58                         ` Lars Ingebrigtsen
2019-11-17 23:01           ` Drew Adams
2019-11-18  9:08           ` Lars Ingebrigtsen
2019-11-19 14:49             ` Stefan Kangas
2019-11-19 15:27               ` Drew Adams
2019-11-19 16:07                 ` Stefan Kangas
2019-11-19 16:12                   ` Stefan Kangas
2019-11-19 16:27                   ` Drew Adams
2019-11-21  0:01                     ` Stefan Kangas
2019-11-21  0:41                       ` Drew Adams
2019-11-19 16:31                   ` Eli Zaretskii
2019-11-19 16:54                     ` Stefan Kangas
2019-11-19 22:50                       ` Juri Linkov
2019-11-19 17:27                   ` 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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8336egvy7h.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=38187@debbugs.gnu.org \
    --cc=alan@idiocy.org \
    --cc=juri@linkov.net \
    --cc=larsi@gnus.org \
    --cc=stefan@marxist.se \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).