Calendar event displaing is very slow

REPRODUCIBILITY: 100%
OS VERSION: 4.4.0.64
HARDWARE: Xperia X
UI LANGUAGE: German
REGRESSION: yes (but from earlier release < 4.3)

DESCRIPTION:

Sailfish Calendar takes very long time (~ 7s) to display events after opening
the app.
The behaviour exists at least since 4.3, maybe even earlier. I remember it showing up after introducing the color dots for events in the Calendar’s month grid.

PRECONDITIONS:

Have some events in at least the Personal and Birthday calendar. Having populated remote calendars might be a related factor

STEPS TO REPRODUCE:

  1. Open Calendar App
  2. Wait until date grid shows
  3. Observe time it takes to display events of current day and the colored bullets for events during the current month

EXPECTED RESULT:

Calendar grid opens, with an immediate view of current day’s events and color dots for other events of the month.

ACTUAL RESULT:

It takes several seconds (around 7 for me) until the Calendar shows any event information and colors in the grid.

MODIFICATIONS:

PM 3 is in use, but without obviously interfering patches (i.e. none modifying Calendar)
Openrepos & Chum are active as package source.

ADDITIONAL INFORMATION:

The phone has a Nextcloud CalDAV connection with a few additional calendars enabled. I verified the behaviour by first disabling the individual calendars in the app and then the whole NC account in settings.
It is still the same and at least superficially does not seem related to remote calendar configuration.

1 Like

Strange, on my X10 ii it looks normal.

Can you open a terminal and as root execute:

journalctl -f

Once it’s done, open Calendar.

Do you have a very large calendar database?

I had that once when the google sync would add many years of calendar data making it huge.

Very crude way of finding out:

devel-su -p sqlite3 .local/share/system/privileged/Calendar/mkcal/db .dump| wc -l

If you trust me or Jolla sailors, you can send the dump also to myself or other sailors so we can reproduce your behaviour. There is not any timing debug options in the calendar stack at the moment, so it could be hard for you to find out what is taking so much time.

I remember once looking at one such issue and it was coming from the birthday creating a lot of recurring events triggerring a N**2 loop somewhere. It has been fixed now, but there may be some other source of delays…

3 Likes

It’s the same for me. Even switching the date takes several seconds. dump and wc gives 1874 lines. The database file has a size of 870k.