emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: image-size


From: Eli Zaretskii
Subject: Re: image-size
Date: Thu, 20 Jun 2013 22:42:25 +0300

> From: Lars Magne Ingebrigtsen <address@hidden>
> Cc: address@hidden
> Date: Thu, 20 Jun 2013 21:34:10 +0200
> 
> With this image:
> 
> http://www.evo.org/html/scans/BAD0013/BAD0013-1-l.jpg
> 
> address@hidden ~/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).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]