Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#291479: gimp: save as (and possibly open) *extremely* slow

2 views
Skip to first unread message

Marc Lehmann

unread,
Jan 20, 2005, 7:40:08 PM1/20/05
to
Package: gimp
Version: 2.2.1-2
Severity: normal


When selecting "Save As..." in a directory containing around 10000 JPEG
files, gimp seemed to freeze. After more than 5 minutes(!!), I killed it.

I retried a few times and the result was the same. Attaching an strace showed that
gimp seemed to do this for *every* file in the directory:

stat("/wd/spool-pserv/bulk/misc-p/p1010053.jpg", {st_mode=S_IFREG|0640, st_size=160682, ...}) = 0
open("/wd/spool-pserv/bulk/misc-p/p1010053.jpg", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0640, st_size=160682, ...}) = 0
mmap(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a9a418000
read(5, "\377\330\377\340\0\20JFIF\0\1\2\1\0H\0H\0\0\377\333\0C"..., 131072) = 131072
close(5) = 0
munmap(0x2a9a418000, 131072) = 0

i.e. it seems to read the first 128kb of every file in the directory,
which is bound to be very slow, as this is 1.2GB of non-linear data reads.

This IMHO is a bug, as the "Save As..." dialog doesn't show a list of
files, so this scanning is completely useless.

Even if it were necessary, other apps are a lot faster:

ls -l # 0.13s (stat data was in cache, both for gimp and these tests)
Gtk2::CV # 0.08s (no file contents are being scanned, just .xvpics are being read)
xv # <60s

Even the venerable (and slow at directory scanning) xv is much faster,
while still detetcing filetypes (and displaying the results).

Earlier versions of gimp took a few seconds at most in the same directory
(while displaying the directory contents).

-- System Information:
Debian Release: 3.1
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.10-rc3
Locale: LANG=C, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)

Versions of packages gimp depends on:
ii aalib1 1.4p5-22 ascii art library
ii gimp-data 2.2.1-2 Data files for The GIMP
ii libart-2.0-2 2.3.16-6 Library of functions for 2D graphi
ii libatk1.0-0 1.8.0-4 The ATK accessibility toolkit
hi libc6 2.3.2.ds1-18 GNU C Library: Shared libraries an
ii libexif10 0.6.9-4 The EXIF library allows you to par
hi libexpat1 1.95.8-1 XML parsing C library - runtime li
ii libfontconfig1 2.2.3-4 generic font configuration library
hi libfreetype6 2.1.7-2.2 FreeType 2 font engine, shared lib
ii libgimp2.0 2.2.1-2 Libraries necessary to run the GIM
ii libgimpprint1 4.2.7-4 The Gimp-Print printer driver libr
ii libglib2.0-0 2.4.8-1 The GLib library of C routines
ii libgtk2.0-0 2.4.14-2 The GTK+ graphical user interface
ii libice6 4.3.0.dfsg.1-10 Inter-Client Exchange library
ii libjpeg62 6b-9 The Independent JPEG Group's JPEG
ii liblcms1 1.13-1 Color management library
ii libmng1 1.0.8-1 Multiple-image Network Graphics li
ii libpango1.0-0 1.6.0-3 Layout and rendering of internatio
ii libpng12-0 1.2.8rel-1 PNG library - runtime
ii libsm6 4.3.0.dfsg.1-10 X Window System Session Management
ii libtiff4 3.6.1-5 Tag Image File Format library
ii libwmf0.2-7 0.2.8-1.1 Windows metafile conversion librar
ii libx11-6 4.3.0.dfsg.1-10 X Window System protocol client li
ii libxmu6 4.3.0.dfsg.1-10 X Window System miscellaneous util
ii libxpm4 4.3.0.dfsg.1-10 X pixmap library
ii libxt6 4.3.0.dfsg.1-10 X Toolkit Intrinsics
ii wget 1.9.1-10 retrieves files from the web
ii xlibs 4.3.0.dfsg.1-10 X Keyboard Extension (XKB) configu
ii zlib1g 1:1.2.2-4 compression library - runtime

-- no debconf information


--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Ari Pollak

unread,
Jan 20, 2005, 8:40:08 PM1/20/05
to
What about saving a file to the same directory in another GTK2 app, like
abiword or gedit?

Marc A. Lehmann

unread,
Jan 20, 2005, 10:30:16 PM1/20/05
to
On Thu, Jan 20, 2005 at 08:27:36PM -0500, Ari Pollak <a...@debian.org> wrote:
> What about saving a file to the same directory in another GTK2 app, like
> abiword or gedit?

It (gedit) seems to also do the same thing (read the first 128k of *every*
file).

The difference is that gedit displays a file requestor with files in it,
while gimp doesn't display a list of files. In the case of gedit, it's
just unusably slow, in the case of gimp, it's unnecessary.

--
The choice of a
-----==- _GNU_
----==-- _ generation Marc Lehmann
---==---(_)__ __ ____ __ p...@goof.com
--==---/ / _ \/ // /\ \/ / http://schmorp.de/
-=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE

0 new messages