[meta] Calendar Perf and Memory Optimization to Prevent Sync Crashes

RESOLVED INCOMPLETE

Status

Firefox OS
Gaia::Calendar
RESOLVED INCOMPLETE
6 years ago
6 years ago

People

(Reporter: GH to BZ, Assigned: lightsofapollo)

Tracking

({meta})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [label:calendar])

(Reporter)

Description

6 years ago
[GitHub issue by dmandelin on 2012-09-28T21:35:33Z, https://github.com/mozilla-b2g/gaia/issues/5459]
Twice today, using the 9/28 build, when I tried to sync the calendar manually (touching the circle-arrows button), this happened:

- button goes away
- time passes...
- calendar crashes

On the third try, it didn't crash, although I also didn't see any events.
(Reporter)

Comment 1

6 years ago
[GitHub comment by lightsofapollo on 2012-09-28T22:04:26Z]
@dmandelin Can I have some details on the calendar you where trying to sync?

Right now we do an _entire_ collection sync so its possible we run out of memory before we get to the records in the present (assuming you have a ton of events).

1. what kind of provider? (Google, Yahoo, Zimbra)
2. some rough of idea of # of events ( I had x calendar for 90 years )
etc..

Thanks!
(Reporter)

Comment 2

6 years ago
[GitHub comment by dmandelin on 2012-09-28T22:49:20Z]
@lightsofapollo 

OOM is quite possible for me. I'm using our Zimbra. It's probably 2-3 years of events at this point.
(Reporter)

Comment 3

6 years ago
[GitHub comment by nhirata on 2012-09-28T23:21:33Z]
I can't reproduce the crash, but then again I don't have 2-3 years of events in my calendar for zimbra.  I think it is a OOM issue?
(Reporter)

Comment 4

6 years ago
[GitHub comment by lightsofapollo on 2012-09-28T23:25:52Z]
@nhirata Highly likely, over the next day or two this will be improved as we will only sync last 30 days + future and it should continue to get better. I was able to sync a good 6 months events & recurring events (with no other apps open) but while it only took around 10 seconds on my desktop it was a good 30-60s on my Oroto.
(Reporter)

Comment 5

6 years ago
[GitHub comment by jds2501 on 2012-09-29T02:11:55Z]
@lightsofapollo That will help improve the issue being hit here, although I might suggest filing a bug in the platform as well for the crash specifically, as the crash portion of this bug is a gecko problem.

We can track a fix for as you've said for what can be done on the Gaia side to mitigate this.
(Assignee)

Updated

6 years ago
Component: Gaia → Gaia::Calendar
Assignee: nobody → jlal
blocking-basecamp: ? → +
(Assignee)

Updated

6 years ago
Depends on: 797014
(Assignee)

Comment 6

6 years ago
A significant amount of progress has been made to reduce sync times but there is still more to be done. I don't think it will crash since we limit the sync range quite a bit now. Its possible that this still could oom without (796743) for very large calendars with hundreds of recurring events.

Marked resolved for now, please give it another try.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED

Updated

6 years ago
Whiteboard: [label:calendar] → [label:calendar] [qa-]
The memory usage of the calendar goes up wildly while trying to sync my zimbra calendar.  It reliably crashes within about 5-10 seconds.  That means the rate of memory allocation is up to 10MB/sec.  That is, ah, rather a lot :).
Blocks: 797189
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Updated

6 years ago
Whiteboard: [label:calendar] [qa-] → [label:calendar]
(Assignee)

Updated

6 years ago
Depends on: 796743

Updated

6 years ago
Priority: -- → P3
Priority: P3 → P1
(Assignee)

Comment 8

6 years ago
P1=top of my queue, but this issue in itself is more a meta bug. 
The calendar crash is due to OOM and there are potential areas for optimization at each layer. I am marking those bugs as blocking this one and will proceed with work on the individual pieces.
Depends on: 805366

Comment 9

6 years ago
Milestoning for C2 (deadline of 12/10), as this meets the criteria of "remaining P1 bugs not already milestoned for C1".
Target Milestone: --- → B2G C2 (20nov-10dec)
When I was testing the patch from bug 805366 before it landed, I didn't see any crashes noticeable anymore. I'm inclined to believe that bug 805366 might fix this bug.

If anyone is still crashing after you try out the patch from bug 805366, please comment in the bug indicating so.
Status: REOPENED → RESOLVED
Last Resolved: 6 years ago6 years ago
Resolution: --- → FIXED
Actually wait a second - didn't realize there's one bug left.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Given that this is a meta bug in reality, I'm changing the bug context to reflect that. The sub-bugs are the actual work items here.

Removing basecamp+ given this is more of a meta bug now.
blocking-basecamp: + → ---
Keywords: meta
Priority: P1 → --
Summary: Calendar crashing on sync → [meta] Calendar Perf and Memory Optimization to Prevent Sync Crashes
Target Milestone: B2G C2 (20nov-10dec) → ---
(Assignee)

Comment 13

6 years ago
There will always be more we can do, lets open up new bugs or another meta-bug as we need them
Status: REOPENED → RESOLVED
Last Resolved: 6 years ago6 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.