From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: image-size Date: Thu, 20 Jun 2013 18:50:07 +0200 Message-ID: References: <837ghopy8a.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1371747038 28186 80.91.229.3 (20 Jun 2013 16:50:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Jun 2013 16:50:38 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 20 18:50:39 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Upi4A-0003vc-Vn for ged-emacs-devel@m.gmane.org; Thu, 20 Jun 2013 18:50:35 +0200 Original-Received: from localhost ([::1]:37295 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upi4A-0002eX-MN for ged-emacs-devel@m.gmane.org; Thu, 20 Jun 2013 12:50:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upi43-0002RE-Ho for emacs-devel@gnu.org; Thu, 20 Jun 2013 12:50:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Upi40-0008OY-Nc for emacs-devel@gnu.org; Thu, 20 Jun 2013 12:50:27 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:43959) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upi40-0008OS-Gl; Thu, 20 Jun 2013 12:50:24 -0400 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Upi3k-00028V-8j; Thu, 20 Jun 2013 18:50:08 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEUkIyb+/v4TEhRcW2A+ PULHyMsvLjIGBAaxXg9cAAACYElEQVQ4jWWTzW/iMBDFrUDN2WJzt1y2vhLssFeqmPS62WB6dSm4 V5Su6n9/Z8ZJ6aqWkJz5+b3nj4HFNkZGg8dpnJ1z7DzVWYzGGGtMYyyCGMNUj6++tr6ufQ8EDLCq RpSdxIEU2UopOYFLSaAlLyUVa0PO34uDIQWSxAswldmJwBkVoRhk4POTxHUXAJasGAv6GiArEHgR Ymmn8LTarVxgD7i1SogSMxyQxbBqV2vGpJTxTMAyByAuhtjO13yHh3GdEMIYdnZwWfraGLflbcEk J+CXoHCuefvw3tsA+2XcCRw9gf2Rw7LerRE0WC8NgaqcAViaHVwA22O9H4Gv8QuyJWMVRhgCTUW2 4oAK/gWYxwxKsytoU+CEoNne4SIPBTiW7UhAYDOnjw7A3ICi9A0Bs7knI6DHxroKnAg0Jozh4GzM DRjLc114B10CQIxgNxMT6UmRQcvk/AsgxcHBQ2HrULXLoIUMajhsnC7vygNwCFwGhXrBcgk3D07x ExSF/lkC8TWCFvZetqMiDR7qWwVHcjFcJhBCSrNK9ArGysWTerXw3qho3tLA66PSg7q2AfSKwPz0 HlKbBq0TDMYWKSmJwAW5KToNJCmdrgQU/KdY5IuZ7n4BGCyIGPwGxeOZ8Yfdu66etdL3ByjKEUDf yvDx9PisiugNemESgULBrPqx7y8edpyGG4DpgH3suz/glz6BAnDFzvClSirdgE46/cW36PpNLo/h cF51QYGvn1KOgKNnBQl832MAhUhU4KTD3vNPuPh/UEG71b/1d8Xe984WQ5rC2QTuehsXelw+Kv4B LT4KwsT5ticAAAAASUVORK5CYII= X-Now-Playing: David Bowie's _"Heroes"_: "The Secret Life Of Arabia" X-Hashcash: 1:23:130620:emacs-devel@gnu.org::BtjgBo5hulABl1Pp:000000000000000000000000000000000000000001Pl5L X-Hashcash: 1:23:130620:eliz@gnu.org::KQxx8GdCsxt0NlUa:00001lQ83 In-Reply-To: <837ghopy8a.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 20 Jun 2013 19:01:57 +0300") User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) X-MailScanner-ID: 1Upi3k-00028V-8j MailScanner-NULL-Check: 1372351808.45028@pN6+P8ZyRYkxMIywbrbFDA X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:160754 Archived-At: Eli Zaretskii writes: > I don't think so. Where do you see X calls that "push the image to > the X server"? I don't, really, but I think somebody said that the last time I asked "why is `image-size' so slow"? > I see no reason for relying on imagemagick. You will see in each > 'load' method a short fragment of code that finds the image size. If > you want a "fast path", just add another flag argument to the 'load' > method that tells it to return as soon as it computed the size, and > that's it. If Emacs doesn't do anything weird in lookup_image, then why does it take so long? Like I said, when running Emacs over ssh, `image-size' is very slow. Calling it on a medium-size image typically takes almost a second from home to work. If I just call the ImageMagick function size function directly, it takes 0.01s on the same image. > Restricting this to Emacs built with imagemagick would be a > regrettable limitation, IMO. Well, it's an optimisation. Which I think 99% of the binary-distributed Emacs copies has, so I didn't really see the need. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/