Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 290851 - net-news/liferea-1.4.28-r1 takes a hell time to load and thrashes the hard drive
Summary: net-news/liferea-1.4.28-r1 takes a hell time to load and thrashes the hard drive
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Víctor Ostorga (RETIRED)
URL:
Whiteboard:
Keywords:
: 403951 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-10-28 09:26 UTC by Andrey Vihrov
Modified: 2012-08-02 12:37 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
liferea --debug-db (log,20.31 KB, text/plain)
2009-11-07 14:27 UTC, Andrey Vihrov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Vihrov 2009-10-28 09:26:49 UTC
Liferea takes a minute or longer to start, and all this time the hard drive is being extremely used.

I've found out that the following makes Liferea start within tenths of second:

Compile this code as a shared library libsync.so:

#define _POSIX_C_SOURCE 200809L
#include <unistd.h>

int fsync (int fd)
{
	return 0;
}

int fdatasync (int fd)
{
	return 0;
}

, and start Liferea with 'LD_PRELOAD="libsync.so" liferea'. So, the enormous time Liferea spends while starting is due to a large amount of useless fsync/fdatasync calls.

Reproducible: Always

Steps to Reproduce:
1. Emerge =net-news/liferea-1.4.28-r1
2. Populate the database with feeds and articles
3. Start Liferea again



Portage 2.1.6.13 (default/linux/amd64/10.0/desktop, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.30-gentoo-r5-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T8100_@_2.10GHz-with-gentoo-1.12.11.1
Timestamp of tree: Wed, 28 Oct 2009 08:45:01 +0000
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.6.2-r1
dev-util/cmake:      2.6.4
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -msse4.1 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=native -msse4.1 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--ask --jobs=2 --load-average=3"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.tups.lv/source/"
LANG="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="ru en lv"
MAKEOPTS="-j3 -l3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/armagetron /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acpi alsa amd64 avahi bash-completion berkdb bluetooth bonjour branding bzip2 cairo cdr cli consolekit cracklib crypt cups dbus djvu dri dts dvd dvdr eds emboss encode evo exif fam ffmpeg firefox flac fortran gdbm gif gnome gnome-keyring gpm gstreamer gtk hal hddtemp iconv id3tag ieee1394 ipod isdnlog jpeg libnotify lm_sensors mad matroska mikmod mmx mmxext modules mp3 mp4 mpeg mudflap multilib nautilus ncurses networkmanager nls nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3support quicktime readline reflection rtc samba sdl session smp spell spl sqlite sse sse2 sse3 sse4_1 ssl ssse3 startup-notification svg sysfs tcpd theora threads thunar tiff totem truetype unicode upnp usb v4l2 vim-syntax vorbis x264 xml xorg xulrunner xv xvid xvmc zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru en lv" USERLAND="GNU" VIDEO_CARDS="intel"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Sebastian Luther (few) 2009-10-29 14:58:29 UTC
You might want to ping upstream about it.
Comment 2 Andrey Vihrov 2009-11-03 11:30:06 UTC
After additional research and googling, it appears that not Liferea itself, but rather the sqlite library may be at fault.
Comment 3 Víctor Ostorga (RETIRED) gentoo-dev 2009-11-07 14:11:31 UTC
Please paste de output of 
liferea --debug-db --debug-performance
Comment 4 Víctor Ostorga (RETIRED) gentoo-dev 2009-11-07 14:17:35 UTC
...and may be you need to do a vacuum of the liferea's database.
You can check http://liferea.blogspot.com/2008/08/how-to-run-vacuum.html to know how to do it.
Comment 5 Andrey Vihrov 2009-11-07 14:27:42 UTC
Created attachment 209544 [details]
liferea --debug-db

Thank you for the hint. Unfortunately, it did not remove the problem completely. Attaching execution log for the "--debug-db" option, run without preloaded functions.
Comment 6 Víctor Ostorga (RETIRED) gentoo-dev 2010-01-23 23:52:47 UTC
(In reply to comment #5)
> Created an attachment (id=209544) [details]
> liferea --debug-db
> 
> Thank you for the hint. Unfortunately, it did not remove the problem
> completely. Attaching execution log for the "--debug-db" option, run without
> preloaded functions.
> 

liferea 1.6.2 has reported an improvement in speed. Keep in mind if you test that version, you will need webkit-gtk
Comment 7 Andrey Vihrov 2010-01-24 11:50:48 UTC
net-news/liferea-1.7.2 has the same behavior. There's a bug upstream [1] which states that the problem indeed is with sqlite3, but the bug was closed with no resolution. There's also extensive discussion available at [2], which proposes several solutions. Solution posted at [3] seems to be in the right direction.

Thanks

[1] http://sourceforge.net/tracker/index.php?func=detail&aid=2216604&group_id=87005&atid=581684
[2] https://bugs.launchpad.net/ubuntu/+source/liferea/+bug/290666
[3] https://bugs.launchpad.net/ubuntu/+source/liferea/+bug/290666/comments/19
Comment 8 Víctor Ostorga (RETIRED) gentoo-dev 2010-04-19 03:35:23 UTC
Updating maintainers
Comment 9 Víctor Ostorga (RETIRED) gentoo-dev 2012-02-16 15:18:32 UTC
*** Bug 403951 has been marked as a duplicate of this bug. ***
Comment 10 Víctor Ostorga (RETIRED) gentoo-dev 2012-08-02 12:37:05 UTC
This has been fixed in liferea 1.8.3