Bug 110523 - karm often freezes for a minute
Summary: karm often freezes for a minute
Status: RESOLVED WORKSFORME
Alias: None
Product: ktimetracker
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Thorsten Staerk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-10 18:42 UTC by John Milton
Modified: 2007-12-05 22:17 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
ics file that contains >3900 vevents (103.58 KB, application/x-tgz)
2006-01-28 13:34 UTC, Thorsten Staerk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Milton 2005-08-10 18:42:04 UTC
Version:           1.4.1 (using KDE KDE 3.3.2)
Installed from:    Debian testing/unstable Packages
OS:                Linux

Karm will freeze for long periods, in a loop, before outputting to karm.ics:

18790 open("/usr/share/zoneinfo/America/Chicago", O_RDONLY) = 14
18790 fstat64(14, {st_mode=S_IFREG|0644, st_size=1279, ...}) = 0
18790 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x402d0000
18790 read(14, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\5\0"..., 4096) = 1279
18790 close(14)                         = 0
18790 munmap(0x402d0000, 4096)          = 0
18790 open("/etc/localtime", O_RDONLY)  = 14
18790 fstat64(14, {st_mode=S_IFREG|0644, st_size=1279, ...}) = 0
18790 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x402d0000
18790 read(14, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\5\0"..., 4096) = 1279
18790 close(14)                         = 0
18790 munmap(0x402d0000, 4096)          = 0

This repeats 19949 times, during which the GUI is unresponsive.

I went into settings, Karm, storage and unchecked "Log history" and restarted Karm and now it works fine and doesn't freeze. When I turn Log history on again, same thing. I've been using Karm for quite a while now. Is this happening because I have a large history? Is this a simple scalability problem?
Comment 1 Mark Bucciarelli 2005-08-10 19:07:09 UTC
On Wed, Aug 10, 2005 at 04:42:06PM -0000, John Milton wrote:
> 18790 open("/usr/share/zoneinfo/America/Chicago", O_RDONLY) = 14

[...]
> This repeats 19949 times, during which the GUI is unresponsive.


Hmm, I am guessing you have around 20,000 VEVENT's in your ics file?  
Could you do a grep -c "BEGIN:VEVENT" to verify?

It looks like some timezone code is running for every single one.

Thanks for your great bug report!

m
Comment 2 John Milton 2005-08-10 20:39:02 UTC
grep -c "BEGIN:VEVENT" .kde/share/apps/karm/karm.ics
3830
Comment 3 Mark Bucciarelli 2005-08-11 00:21:09 UTC
On Wed, Aug 10, 2005 at 06:39:03PM -0000, John Milton wrote:
> grep -c "BEGIN:VEVENT" .kde/share/apps/karm/karm.ics
> 3830


hmmm, multiple time fields per vevent?

i think your guess is right--it's a scaling issue.

how did you generate that output in the original bug report--strace?

this is maybe a libkcal issue.  seems like the timezone should be 
cached, at least at the beginning of each file open and save.

i'll look into it.

m
Comment 4 Thorsten Staerk 2005-11-06 19:20:40 UTC
Not reproducible here. Yes, karm freezes when writing to the iCal file, and yes, the duration increases with the number of events you are having. But the freeze duration increases linearyly only and, for my 4000 events, it freezes for two seconds only:

***************************************************************************
kde-devel@scorpio:/root/svn/3.5/kdepim/karm> date && dcop karm-1597 KarmDCOPIface stoptimerfor task6 && date
Sun Nov  6 19:45:03 CET 2005

Sun Nov  6 19:45:05 CET 2005
kde-devel@scorpio:/root/svn/3.5/kdepim/karm> grep -c "BEGIN:VEVENT" ~/.kde-unstable/share/apps/karm/karm.ics
3964
kde-devel@scorpio:/root/svn/3.5/kdepim/karm> cat /proc/cpuinfo | grep MHz
model name      : Intel(R) Pentium(R) 4 CPU 1500MHz
cpu MHz         : 378.405
kde-devel@scorpio:/root/svn/3.5/kdepim/karm> cat /etc/SuSE-release
SUSE LINUX 10.0 (i586)
VERSION = 10.0
kde-devel@scorpio:/root/svn/3.5/kdepim/karm> gcc --version
gcc (GCC) 4.0.2 20050901 (prerelease) (SUSE Linux)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
***************************************************************************

I have made the experience that with Debian, some executables are really slow if not compiled on your own. Besides that, a lot has changed within KDE's iCal handling since 3.3. I recommend you to compile kdepim 3.3 on your own as a start. It is described here:
http://developer.kde.org/build/compile_kde3_3.html

Thanks for the excellent analysis. Please come back and tell us about the result! We leave the bug open!
Comment 5 Thorsten Staerk 2005-11-06 19:24:51 UTC
And if you have any problems compiling, just ask them here. I want to have this bug closed as soon as possible. For our power-users, only the best!
Comment 6 Thorsten Staerk 2006-01-28 13:34:57 UTC
Created attachment 14413 [details]
ics file that contains >3900 vevents

Can you verify that your issue occurs with that file's content ?
Comment 7 Thorsten Staerk 2006-04-06 22:15:33 UTC
okay, so I cannot reproduce.
Comment 8 Thorsten Staerk 2007-11-04 16:44:47 UTC
This bug has been observed again. Again on Debian. I often see Debian programs that need to be recompiled from source and then just run fine.
Comment 9 Thorsten Staerk 2007-11-04 16:45:19 UTC
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=423001
Comment 10 Thorsten Staerk 2007-12-05 22:17:52 UTC
Please re-open as soon as you have a file that is so slow. If you can provide this file, super, if you cannot, I can find my way through to fixing nevertheless as long as you can test for me. Anyway, there is no way how I can reproduce this bug and I never heard about it if not for Debian.