--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: okular: runs open() and stat64() 632 times on certain files in home directory
- From: Arthur Marsh <arthur.marsh@internode.on.net>
- Date: Mon, 09 Feb 2009 03:42:55 +1030
- Message-id: <20090208171255.13730.73712.reportbug@localhost>
Package: okular
Version: 0.7.1-1
Severity: normal
I was trying to find out why okular what slow to start up and ran strace
on it. I found that even though okular was run from a directory other
than my home directory, for files whose extension was not a known mime
type, open() was called followed by stat64() being called 632 times per
file open()'d:
e.g.
open("/home/amarsh04/FILE_ID.DIZ", O_RDONLY|O_LARGEFILE) = 14
fcntl64(14, F_SETFD, FD_CLOEXEC) = 0
stat64("/home/amarsh04/FILE_ID.DIZ", {st_mode=S_IFREG|0644, st_size=327,
...}) =
0
stat64("/home/amarsh04/FILE_ID.DIZ", {st_mode=S_IFREG|0644, st_size=327,
...}) =
0
fstat64(14, {st_mode=S_IFREG|0644, st_size=327, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7
f2d000
_llseek(14, 0, [0], SEEK_SET) = 0
read(14, "F"..., 1) = 1
stat64("/home/amarsh04/FILE_ID.DIZ", {st_mode=S_IFREG|0644, st_size=327,
...}) =
0
read(14, "IDONEWS 08 May 2006 Vol 23 "..., 4096) = 326
read(14, ""..., 4096) = 0
stat64("/home/amarsh04/FILE_ID.DIZ", {st_mode=S_IFREG|0644, st_size=327,
...}) =
0
_llseek(14, 0, [0], SEEK_SET) = 0
read(14, "FIDONEWS 08 May 2006 Vol 23"..., 4096) = 327
read(14, ""..., 4096) = 0
on and on until stat64 had been called 632 times for the one file, then
proceeding on to the next file whose extension wasn't recognised:
stat64("/home/amarsh04/FILE_ID.DIZ", {st_mode=S_IFREG|0644, st_size=327,
...}) =
0
close(14) = 0
munmap(0xb7f2d000, 4096) = 0
open("/home/amarsh04/I-can-spell.denemo", O_RDONLY|O_LARGEFILE) = 14
fcntl64(14, F_SETFD, FD_CLOEXEC) = 0
stat64("/home/amarsh04/I-can-spell.denemo", {st_mode=S_IFREG|0644,
st_size=1392,
...}) = 0
stat64("/home/amarsh04/I-can-spell.denemo", {st_mode=S_IFREG|0644,
st_size=1392,
...}) = 0
fstat64(14, {st_mode=S_IFREG|0644, st_size=1392, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7
f2d000
_llseek(14, 0, [0], SEEK_SET) = 0
read(14, "\37"..., 1) = 1
stat64("/home/amarsh04/I-can-spell.denemo", {st_mode=S_IFREG|0644,
st_size=1392,
...}) = 0
and so on through several files.
In running okular from a directory other than my home directory, opening
the file open dialogue, letting it load, then selecting cancel then
quitting okular, (where my home directory has 616 files not starting
with "." and the other directory has 583 files not starting with "."), I
had open() called 878 times and stat64() called 88522 times.
This seems to be an excessive use of stat64().
-- System Information:
Debian Release: 5.0
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.28-1-686 (SMP w/1 CPU core)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages okular depends on:
ii kdebase-runtime 4:4.1.0-2 runtime components from the offici
ii kdelibs5 4:4.1.0-3+b1 core libraries for all KDE 4 appli
ii libc6 2.7-18 GNU C Library: Shared libraries
ii libfreetype6 2.3.7-2 FreeType 2 font engine, shared lib
ii libgcc1 1:4.3.3-3 GCC support library
ii libjpeg62 6b-14 The Independent JPEG Group's JPEG
ii libokularcore1 0.7.1-1 libraries for the Okular document
ii libpoppler-qt4-3 0.8.7-1 PDF rendering library (Qt 4 based
ii libqca2 2.0.0-4 libraries for the Qt Cryptographic
ii libqimageblitz4 1:0.0.4-4 QImageBlitz image effects library
ii libqt4-dbus 4.4.3-2 Qt 4 D-Bus module
ii libqt4-qt3support 4.4.3-2 Qt 3 compatibility library for Qt
ii libqt4-xml 4.4.3-2 Qt 4 XML module
ii libqtcore4 4.4.3-2 Qt 4 core module
ii libqtgui4 4.4.3-2 Qt 4 GUI module
ii libspectre1 0.2.2.ds-1+b1 Library for rendering Postscript d
ii libstdc++6 4.3.3-3 The GNU Standard C++ Library v3
ii zlib1g 1:1.2.3.3.dfsg-12 compression library - runtime
okular recommends no packages.
Versions of packages okular suggests:
pn okular-extra-backends <none> (no description available)
-- debconf-show failed
--- End Message ---