all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Anders Waldenborg <anders@0x63.nu>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: 6230@debbugs.gnu.org
Subject: bug#6230: 23.2; Pixmaps kept in X11 after (svg?) images no longer are used
Date: Thu, 20 May 2010 22:07:37 +0200	[thread overview]
Message-ID: <4BF59689.7020003@0x63.nu> (raw)
In-Reply-To: <87r5l6v6hg.fsf@stupidchicken.com>

On 05/20/2010 07:16 PM, Chong Yidong wrote:
> You can run (clear-image-cache) to eliminate the image data.  Emacs also
> does this automatically, every hundred redisplays.
>

Thanks,

I can confirm that running (clear-image-cache) removes them from the X 
server.

However I can't see that it is done every 100 redisplays. If it were I 
would expect the code below to never create more than 100 (+ the ones 
that were there before it started) pixmaps in X11. Letting it run while 
writing this mail it now has reached above 3000 pixmaps according to 
xrestop.


(defun aw-svg-image-test-update (buf)
   (interactive)
   (with-current-buffer buf
     (erase-buffer)
     (insert-image (create-image (format "<svg width=\"50\" 
height=\"50\"><rect x=\"0\" y=\"0\" width=\"100\" height=\"100\" 
fill=\"#%02x%02x%02x\"/></svg>" (random 255)(random 255)(random 255)) 
'svg t))))

(defun aw-svg-image-test-kill-buffer-hook ()
   (cancel-timer aw-svg-image-test-timer))

(defun aw-svg-image-test ()
   (interactive)
   (with-current-buffer (generate-new-buffer "*aw-svg-image-test*")
     (display-buffer (current-buffer))
     (make-local-variable 'aw-svg-image-test-timer)
     (add-hook 'kill-buffer-hook 'aw-svg-image-test-kill-buffer-hook nil t)

     (setq aw-svg-image-test-timer (run-at-time nil 0.2 
'aw-svg-image-test-update (current-buffer)))))



  anders





  reply	other threads:[~2010-05-20 20:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-20 15:40 bug#6230: 23.2; Pixmaps kept in X11 after (svg?) images no longer are used Anders Waldenborg
2010-05-20 17:16 ` Chong Yidong
2010-05-20 20:07   ` Anders Waldenborg [this message]
2010-05-20 20:32     ` Chong Yidong
2010-05-21  6:37       ` Anders Waldenborg
2010-05-21 17:35         ` Chong Yidong
2010-05-21 20:12           ` Stefan Monnier
2010-05-21 20:43           ` Anders Waldenborg

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=4BF59689.7020003@0x63.nu \
    --to=anders@0x63.nu \
    --cc=6230@debbugs.gnu.org \
    --cc=cyd@stupidchicken.com \
    /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.