maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [howto] fix calendar - calendar db file too big - calendar widget freezes hildon desktop or calendar opens slow (https://talk.maemo.org/showthread.php?t=65763)

-miniME- 2010-11-17 09:32

[howto] fix calendar - calendar db file too big - calendar widget freezes hildon desktop or calendar opens slow
 
hi

i run into a problem that my calendar behaved strange - it loaded slow and showed me the view of yesterday. also calendar widgets froze the hildon desktop.

anyway i discovered that the /home/user/.calendar/calendardb was far too big - 120MB around.

i tried to sync it to pc or other phone or syncml services - n900 took for ever to sync and nothing was synced.
i also tried to export calendar with the calendar's own export function. it did not work.

so i tried to extract calendar info from the db file and discovered it is a sqlite3 db-file.

this made things easy - even possible on device (i used for performance reasons the pc):
- sqlite3 calendardb .dump >calendardb.dump

with that dumped sql file (now 250mb large) i checked that it repeated one sql command far too often:

"INSERT INTO "XProperties" VALUES(180,'X-EPOCAGENDAENTRYTYPE','TODO');"

i deleted the block of repeated sql commands and let only one command stay.

i created a sqlite3 db file :
- cat calendardb.fixed |sqlite3 calendardb (i have now 280k file)
- sqlite3 calendardb .reindex

this file i put back to /home/user/.calendar and my calendar and widgets are usable again.

did not test the sync yet - but it will work i guess.

ciao and good luck

pelago 2010-11-17 10:23

Re: [howto] fix calendar - calendar db file too big - calendar widget freezes hildon desktop or calendar opens slow
 
Well done. What was the repeated command, out of interest?

slipkornsaad 2011-05-22 00:06

Re: [howto] fix calendar - calendar db file too big - calendar widget freezes hildon desktop or calendar opens slow
 
I had the same prob the past few days, I ended up by reflashing my N900, now I want to restore the back up manually but without this calendar db file, will this be possible? It's ok to just delete this db file from the zip backup file?

zamorph 2011-06-10 18:33

Re: [howto] fix calendar - calendar db file too big - calendar widget freezes hildon desktop or calendar opens slow
 
I just wanted to say a big thank you to miniME - I had similar problems / symptoms - the Calendar Process would use 80% CPU for long periods - and my N900 would become unusable - flashing didn't solve the problem either.

Eventually, with the help of this thread, I used SQLite to view the calendardb file. It had grown to 395 MB!

I copied the calendardb file to /home/user/MyDocs (took a long time). I then connected my N900 to my computer via USB - copied the file to my computer - and viewed the contents with the SQLite Database Browser (http://sqlitebrowser.sourceforge.net).

I discovered that just 3 ComponentId's in the XProperties Table took up 10,485,760 rows! I deleted all of these.

I then saved and compacted the database (calendardb) - copied it back to MyDocs on the N900 - and then copied it back to /home/user/.calendar/calendardb (after I had made a copy of the original calendardb).

The Calendar, and my N900, seem to be working much better now!

I think the problem came about because I had previously migrated recurring Calendar Tasks from my old Nokia N78.

yanness 2011-06-10 21:32

Re: [howto] fix calendar - calendar db file too big - calendar widget freezes hildon desktop or calendar opens slow
 
Hi mate,

I have the exact same problem but I don't know SQlite. Could you please post all the exact step and command (exact SQlite command you typed in step by steps)you used to fix it. It will really help.

Cheers


Quote:

Originally Posted by zamorph (Post 1026651)
I just wanted to say a big thank you to miniME - I had similar problems / symptoms - the Calendar Process would use 80% CPU for long periods - and my N900 would become unusable - flashing didn't solve the problem either.

Eventually, with the help of this thread, I used SQLite to view the calendardb file. It had grown to 395 MB!

I copied the calendardb file to /home/user/MyDocs (took a long time). I then connected my N900 to my computer via USB - copied the file to my computer - and viewed the contents with the SQLite Database Browser (http://sqlitebrowser.sourceforge.net).

I discovered that just 3 ComponentId's in the XProperties Table took up 10,485,760 rows! I deleted all of these.

I then saved and compacted the database (calendardb) - copied it back to MyDocs on the N900 - and then copied it back to /home/user/.calendar/calendardb (after I had made a copy of the original calendardb).

The Calendar, and my N900, seem to be working much better now!

I think the problem came about because I had previously migrated recurring Calendar Tasks from my old Nokia N78.



All times are GMT. The time now is 12:09.

vBulletin® Version 3.8.8