Last Comment Bug 1169062 - Lightning extremely slow/unresponsive with Google Birthday calendar
: Lightning extremely slow/unresponsive with Google Birthday calendar
Status: RESOLVED FIXED
: perf
Product: Calendar
Classification: Client Software
Component: Provider: GData (show other bugs)
: Lightning 3.3
: Unspecified Unspecified
P1 normal (vote)
: 4.5
Assigned To: Philipp Kewisch [:Fallen]
:
:
Mentors:
: 1147174 1169581 1169605 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-05-27 15:18 PDT by patrick
Modified: 2015-08-25 12:54 PDT (History)
12 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Fix - v1 (7.43 KB, patch)
2015-08-06 15:55 PDT, Philipp Kewisch [:Fallen]
mohit.kanwal: review+
Details | Diff | Splinter Review
gdata-provider-1.0.5pre1.xpi (75.52 KB, application/x-xpinstall)
2015-08-06 16:01 PDT, Philipp Kewisch [:Fallen]
no flags Details
error_console.png (153.45 KB, image/png)
2015-08-11 07:55 PDT, Marco
no flags Details

Description User image patrick 2015-05-27 15:18:30 PDT
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.
Comment 1 User image patrick 2015-05-27 15:32:18 PDT
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 https://bugzilla.mozilla.org/show_bug.cgi?id=576017#c39
Comment 2 User image Moritz Strübe 2015-06-08 01:07:43 PDT
*** Bug 1169605 has been marked as a duplicate of this bug. ***
Comment 4 User image Todd Knarr 2015-06-14 20:18:00 PDT
(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.
Comment 5 User image [:MakeMyDay] 2015-06-15 23:17:10 PDT
*** Bug 1169581 has been marked as a duplicate of this bug. ***
Comment 6 User image Todd Knarr 2015-06-19 13:04:25 PDT
(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.
Comment 7 User image Philipp Kewisch [:Fallen] 2015-08-01 02:56:40 PDT
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.
Comment 8 User image Philipp Kewisch [:Fallen] 2015-08-06 15:55:05 PDT
Created attachment 8644658 [details] [diff] [review]
Fix - v1

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.
Comment 9 User image Philipp Kewisch [:Fallen] 2015-08-06 16:01:22 PDT
Created attachment 8644662 [details]
gdata-provider-1.0.5pre1.xpi

Installing this xpi should reset only the birthdays calendar and redownload it correctly. Your performance issues will be a thing of the past.
Comment 10 User image Christophe Sperandio 2015-08-09 01:03:18 PDT
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...
Comment 11 User image Philipp Kewisch [:Fallen] 2015-08-09 01:15:34 PDT
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.
Comment 12 User image Christophe Sperandio 2015-08-09 01:33:30 PDT
Ok! Super nice! That will be a major bugfree release then! :)
Comment 13 User image Mohit Kanwal [:redDragon] 2015-08-10 23:22:26 PDT
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.
Comment 14 User image Marco 2015-08-11 03:18:25 PDT
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
Comment 15 User image Philipp Kewisch [:Fallen] 2015-08-11 03:45:38 PDT
Marco, do you get any error console messages? What version of Thunderbird are you using?
Comment 16 User image Marco 2015-08-11 07:55:17 PDT
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 marcoben73@gmail.com

[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://marcoben73@gmail.com/?calendar=andrea.carrara%40soluzione1.it, result=Components.interfaces.nsILoadInfo is undefined, op=[xpconnect wrapped calIOperation]"]

[calCachedCalendar] replayChangesOn finished.

I will add an image with the error console
Comment 17 User image Marco 2015-08-11 07:55:56 PDT
Created attachment 8646386 [details]
error_console.png

Error console Messages
Comment 18 User image Londë 2015-08-11 08:37:52 PDT
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.
Comment 19 User image Philipp Kewisch [:Fallen] 2015-08-11 12:42:09 PDT
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.
Comment 20 User image Philipp Kewisch [:Fallen] 2015-08-20 12:18:05 PDT
*** Bug 1147174 has been marked as a duplicate of this bug. ***
Comment 21 User image Philipp Kewisch [:Fallen] 2015-08-25 02:07:10 PDT
Pushed to comm-central changeset f5e8bee91fc8

Note You need to log in before you can comment on or make changes to this bug.