Closed Bug 1169062 Opened 5 years ago Closed 5 years ago

Lightning extremely slow/unresponsive with Google Birthday calendar


(Calendar :: Provider: GData, defect, P1)

Lightning 3.3


(Not tracked)



(Reporter: patrick, Assigned: Fallen)



(Keywords: perf)


(3 files)

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
Build ID: 20150513174244

Steps to reproduce:

- Installed Lightning and Provider for Google Calendar
- Opened the Calendar tab
- Enabled some calendars, amongst others the birthday calendar
- synced

Actual results:

Lightning becomes very slow and even unresponsive for a long time (tens of seconds), e.g. when I switch to the Mail tab and back to the calendar tab.

Expected results:

Lightning should have updated the screen in a timely manner.
I have already identified the cause of the slowness. If I disable the birthday calendar, everything is functioning normally.

The problem is 'fixed' by opening my Google Calendar and edit the settings of the birthday Calendar. Changing the setting from "Google+ circles and contacts" to "Contacts only" makes Lightning responsive again.

It looks like it's the same problem as described in
Duplicate of this bug: 1169605
Keywords: perf
(In reply to MakeMyDay from bug 1169581 comment #10)
> Can you please check one of the birthday events for their recurrence rule -
> is this set to repeat forever? Please reply on bug 1169062 for that.

Those events don't seem to have a recurrence rule that I can see anywhere. They all show as a single non-recurring event, but that can't be right. The fix from 1169062 (making the calendar contacts-only) does fix the slowness and error message.
Duplicate of this bug: 1169581
(In reply to Todd Knarr from comment #4)

Apparently making the birthday calendar contacts-only doesn't fix the bug. It reduces the slowdown and lag, but doesn't eliminate it. Only unsubscribing from the birthday calendar completely relieves the problem. I'm not in a position to pull the raw XML for the calendar to see exactly how it handles recurrence at that level.
I've found the solution for this, adding one $ to the code fixes it. Now I just need to test the migration code and figure out why bug 1190012 is happening so I can see if the unit test works.
Attached patch Fix - v1Splinter Review
Ok, giving up on fixing all unit tests and moving forward on this issue. The unit test here will work once bug 1190012 is fixed. I'll attach a testing xpi in a moment.
Assignee: nobody → philipp
Ever confirmed: true
Attachment #8644658 - Flags: review?(mohit.kanwal)
Installing this xpi should reset only the birthdays calendar and redownload it correctly. Your performance issues will be a thing of the past.
I can confirm the new xpi fixes the issue. Thank you very much! :)
It should be released any time soon now, because with Lightning now shipped by default with TB, and the help page directly referring and explaining how to set up Google Calendar integration with this gdata-provider, it will be a lot more visible. And (that's what happened for me at least!) degrading so much performance after you set it up with the version officially available makes a really bad experience and drove me to disable totally Lightning at the first place...
I am working on getting a new version out asap. There are a small number of other bugs I'd like to fix in addition for the net release, e.g. bug 1146286.
Ok! Super nice! That will be a major bugfree release then! :)
Comment on attachment 8644658 [details] [diff] [review]
Fix - v1

Review of attachment 8644658 [details] [diff] [review]:

Patch looks good. I tried with the xpi provided, synced my Google birthday calendar, found no issues, my birthday calendar has around 1000 contacts.
Attachment #8644658 - Flags: review?(mohit.kanwal) → review+
The patch doesn't work for me.
When a try to add calendars from my google account the list of available calendars is empty.
I had to revert back to 1.0.4
Marco, do you get any error console messages? What version of Thunderbird are you using?
Flags: needinfo?(marcoben73)
Hi Philipp,
I've Thunderbird 31.7.0, Lightning 3.3.3, gdata 1.0.4
To test your patch I follow these steps:
1) delete all google calendar in Lightning
2) disable gdata 1.0.4, restart Thunderbird, install gdata 1.0.5pre1, restart Thunderbird
3) In Lightning: New Calendar -> Google calendar -> (select my gmail account) -> ... list of calendars is empty

I've no idea how to export all the messages from error console.
It seems to me the messages useful for you are:

[calGoogleCalendar] Successfully acquired a new OAuth token for

[calGoogleCalendar] Error syncing:
2147500037:[Exception... "Components.interfaces.nsILoadInfo is undefined"  nsresult: "0x0 (NS_OK)"  location: "JS frame :: resource://gdata-provider/modules/gdataRequest.jsm :: cGR_fail :: line 233"  data: no]

[JavaScript Error: "[calCachedCalendar] replay action failed: null, uri=googleapi://, result=Components.interfaces.nsILoadInfo is undefined, op=[xpconnect wrapped calIOperation]"]

[calCachedCalendar] replayChangesOn finished.

I will add an image with the error console
Flags: needinfo?(marcoben73)
Attached image error_console.png
Error console Messages
Thanks Philipp,
works for me. i didn't download birthday's calendar (or it stuck all thunderbird) and after upgrade with your patch i don't find any problems to add the calendar. 

thanks a lot.
Marco, this is a different error caused by bug 1099592. I'll fix this one in bug 1193482. If you upgrade to Thunderbird 38 then it will work again.
Priority: -- → P1
Duplicate of this bug: 1147174
Pushed to comm-central changeset f5e8bee91fc8
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.4
Target Milestone: 4.4 → 4.5
You need to log in before you can comment on or make changes to this bug.