Year view is really slow

Bug #1222846 reported by Michael Hall on 2013-09-09
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu Calendar App
Kunal Parmar

Bug Description

The new Year view is very slow, we should look into either simplifying the design to reduce the number of components, or refactor the code to generate only what is immediately needed to display to the user.

Related branches

Michael Hall (mhall119) on 2013-09-09
Changed in ubuntu-calendar-app:
status: New → Confirmed
David Planella (dpm) on 2013-09-25
Changed in ubuntu-calendar-app:
status: Confirmed → Triaged
importance: Undecided → High
Kunal Parmar (pkunal-parmar) wrote :

I was debugging the issue, There seems two issue
1) Vertical scrolling is slow
2) Horizontal scrolling is not smooth, it's movement stops for sometime and then continue

For 1), it seems problem with Flickable element, vertical scrolling supported but it is tool slow and there is no acceleration and deceleration support, which make it seems slow. If you drag view manually rather then flicking, it scrolls just fine.

Same problem can be seen with WeekView and DayView when you scroll TimeLine, there is no acceleration. For YearView it's just more visible.

For 2), When we scroll horizontal, year changes, we do calculation to display dates for next year or previous year. As this are done in Main GUI thread. It hangs the GUI thread for sometime and then continue.

This does not affect the MonthView (Which uses same logic), so I guess reducing the number of month displayed in one view will help. But we need to confirmation from Design team if they are fine with it.

Changed in ubuntu-calendar-app:
assignee: nobody → Kunal Parmar (pkunal-parmar)
Olivier Tilloy (osomon) wrote :

I’m testing on a Galaxy Nexus, and the year view is slow when scrolling both vertically and horizontally.
Vertical scrolling doesn’t just "seem" slow. It is very slow, due to the number of items in the scene.

Looking at the code, each screen of the YearView is a Flickable with a Grid inside it. Meaning that all the months are always instantiated in memory, even though a maximum of 6 of them are partially visible at any given time. Replacing the flickable with a GridView would probably help, as it will keep only the delegates needed in memory.

Jacek Nykis (jacekn) wrote :

I also noticed weird behavior when scrolling vertically in the year view.

If I do it slowly and move it just enough to see the year it is initially showing previous year. Then when I scroll a bit more ther is short lock up and year is update to what it should be.

Kunal Parmar (pkunal-parmar) wrote :

HI Jacekn,

The issue you are observing seems different issue, I tried to solve that by following MR

Olivier Tilloy (osomon) wrote :

> I also noticed weird behavior when scrolling vertically in the year view.

You mean horizontally, right?

Changed in ubuntu-calendar-app:
status: Triaged → In Progress

Fix committed into lp:ubuntu-calendar-app at revision 221, scheduled for release in ubuntu-calendar-app, milestone alpha-1

Changed in ubuntu-calendar-app:
status: In Progress → Fix Committed
Changed in ubuntu-calendar-app:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers