From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: image-size Date: Thu, 20 Jun 2013 22:42:25 +0300 Message-ID: <83mwqko9ge.fsf@gnu.org> References: <837ghopy8a.fsf@gnu.org> <83zjukog7h.fsf@gnu.org> <83txksodgv.fsf@gnu.org> <83r4fwocqd.fsf@gnu.org> <83ppvgoaw9.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1371757342 11672 80.91.229.3 (20 Jun 2013 19:42:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Jun 2013 19:42:22 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 20 21:42:23 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 1UpkkR-0001Dm-9r for ged-emacs-devel@m.gmane.org; Thu, 20 Jun 2013 21:42:23 +0200 Original-Received: from localhost ([::1]:58487 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpkkQ-0007Z2-F3 for ged-emacs-devel@m.gmane.org; Thu, 20 Jun 2013 15:42:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpkkM-0007Sa-Lx for emacs-devel@gnu.org; Thu, 20 Jun 2013 15:42:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UpkkL-0003CV-4U for emacs-devel@gnu.org; Thu, 20 Jun 2013 15:42:18 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:55591) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpkkK-0003CG-Rn for emacs-devel@gnu.org; Thu, 20 Jun 2013 15:42:17 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MOP00800INRN300@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Thu, 20 Jun 2013 22:42:15 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MOP008HJIQFEH90@a-mtaout21.012.net.il>; Thu, 20 Jun 2013 22:42:15 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 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:160772 Archived-At: > From: Lars Magne Ingebrigtsen > Cc: emacs-devel@gnu.org > Date: Thu, 20 Jun 2013 21:34:10 +0200 > > With this image: > > http://www.evo.org/html/scans/BAD0013/BAD0013-1-l.jpg > > [larsi@stories ~/mgnus]$ ls -l /home/larsi/Catalogue/html/scans/BAD0013/BAD0011-l.jpg > -rw-r--r-- 1 larsi users 2399848 Feb 25 2007 /home/larsi/Catalogue/html/scans/BAD0013/BAD0013-1-l.jpg > > (benchmark-elapse (image-size (create-image "/home/larsi/Catalogue/html/scans/BAD0013/BAD0013-1-l.jpg") nil)) > => 46.614988405 > > 46 seconds to query the size. > > With a local X, this is the result: > > (benchmark-elapse (image-size (create-image "/home/larsi/Catalogue/html/scans/BAD0013/BAD0013-1-l.jpg") nil)) > => 0.572555233 > > > strace shows that this is what Emacs does during that time: > > pid 16301] 0.000055 writev(4, [{"H\2\316\362^\0 \4_\0 \4H\16\21\0\0\0\265\6\0\30 \4", 24}, {"\"\"\34\0\"\"\34\0\"\"\34\0\"\"\34\0\r\10\v\0\32\27\25\0\32\27\25\0\32\27\25\0"..., 248608}, {"", 0}], 3) = 248632 > [pid 16301] 0.000055 writev(4, [{"H\2\316\362^\0 \4_\0 \4H\16\21\0\0\0\306\6\0\30 \4", 24}, {"\32\27\25\0\32\27\25\0\32\27\25\0\32\27\25\0\32\27\25\0\32\27\25\0\32\27\25\0\32\27\25\0"..., 248608}, {"", 0}], 3) = 248632 > [pid 16301] 0.000191 writev(4, [{"H\2\316\362^\0 \4_\0 \4H\16\21\0\0\0\327\6\0\30 \4", 24}, {"\32\27\25\0\"\"\34\0\32\27\25\0#$&\0\"\"\34\0\"\"\34\0\32\27\25\0#$&\0"..., 248608}, {"", 0}], 3) = 248632 > > fd 4 is the X-over-ssh socket. Is this using imagemagick or using libjpeg? If the former, perhaps imagemagick is the only library that needs your "fast path". The other image libraries don't, as they clearly don't write to X (otherwise I couldn't have used them on Windows).