Closed Bug 796789 Opened 12 years ago Closed 11 years ago

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

Categories

(Firefox OS Graveyard :: Gaia::Calendar, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: ghtobz, Assigned: jlal)

References

Details

(Keywords: meta, Whiteboard: [label:calendar])

[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.
[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!
[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.
[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?
[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.
[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.
Component: Gaia → Gaia::Calendar
Assignee: nobody → jlal
blocking-basecamp: ? → +
Depends on: 797014
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
Closed: 12 years ago
Resolution: --- → FIXED
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: slim-fast
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: [label:calendar] [qa-] → [label:calendar]
Depends on: 796743
Priority: -- → P3
Priority: P3 → P1
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
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
Closed: 12 years ago12 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) → ---
There will always be more we can do, lets open up new bugs or another meta-bug as we need them
Status: REOPENED → RESOLVED
Closed: 12 years ago11 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.