jdgeenen / gcontactsync

Synchronizes contacts & groups between Thunderbird or SeaMonkey and Google Contacts. Imports Facebook friends and Twitter contacts
Other
72 stars 15 forks source link

Synchronization is significantly slower in TB 68 #152

Open jdgeenen opened 4 years ago

jdgeenen commented 4 years ago

Describe the bug Synchronization takes significantly longer in TB 68.

To Reproduce Synchronize

Application (please complete the following information):

Additional context Some users have reported times as bad as 2-3s per contact. Relates to issue #148

martinsydsin commented 4 years ago

Hi I am running TB 6.2.2 and experience a similar problem - the sync just stops at some stage. I have tried to set the numbers to 0 and increase them by a factor of x100. Neither approach solves the problem. Restarting and synching again will fetch some additional contacts but it also creates duplicates.

The log seems to terminate abruptly but always at a different entry. I have ~2400 contacts and it will download the first 100 and some more every time I close Tb and re-sync. Happy to assist in debugging in case I can be of any help. Martin

FaxNumber: '', type: '' CellularNumber: '', type: '' PagerNumber: '', type: '' HomeFaxNumber: '', type: '' OtherNumber: '', type: '' JobTitle: 'Procurement', type: 'undefined' Company: 'Amdocs', type: 'undefined' Department: '', type: '' JobDescription: '', type: '' CompanySymbol: '', type: '' PhotoURL: 'https://www.google.com/m8/feeds/photos/media/martin.strommer%40gmail.com/6122ce40b277ca5', type: 'undefined' SelfURL: 'https://www.google.com/m8/feeds/contacts/martin.strommer%40gmail.com/full/6122ce40b277ca5', type: 'undefined' EditURL: 'https://www.google.com/m8/feeds/contacts/martin.strommer%40gmail.com/full/6122ce40b277ca5', type: 'undefined' WebPage2: '', type: '' WebPage1: '', type: '' HomeAddressMult: '', type: '' HomeCity: '', type: '' HomeState: '', type: '' HomeZipCode: '', type: '' HomeCountry: '', type: '' WorkAddressMult: '', type: '' WorkCity: '', type: '' WorkState: '', type: '' WorkZipCode: '', type: '' WorkCountry: '', type: '' Relation0: '', type: '' Relation1: '', type: '' Relation2: '', type: '' Relation3: '', type: '' Relation4: '', type: '' Relation5: '', type: '' Yoshikazu Sakata - Yoshikazu.Sakata@dimensiondata.com - 1574456067645 http://www.google.com/m8/feeds/contacts/martin.strommer%40gmail.com/base/6244f300aefa95b

martinsydsin commented 4 years ago

Hi - did some more testing after my TB automatically upgraded itself to 68.4.1. I believe this is a timeout issue, possibly on the server side. When turning logging off gcontactsync is able to fetch substantially more contacts but still stops around the 1150-1350 mark (I have over 2k contacts). Turning off or setting a high value for the dom.max_ flags does not seem to make any difference. No error messages without logging but also no error messages with logging, the script just seems to stop in the middle of the run. Hope this helps, meanwhile I will downgrade to 60.9.1. Martin

djzgib commented 4 years ago

Hello,

Same problem here.

Whenever I restart/clear data from gContactSync and try to sync, I get to around 1300-1400 contacts, than it just stops.

I never get to that "gContactSync Notification" window which should give me summary about added, updated, removed contacts etc. Counter simply goes up, counting added contacts and then it stops around 800 or 1000 or 1300 contacts. I have around 1900 contacts in my google account.

I have tried uninstalling gContactSync, restarting, changing TB profile...no luck.

Funny thing is that I have same combination of gContactSync and TB on my other laptop (latest gContactSync 3.1.7 and TB 68.5.0 32-bit) and on that other (old) laptop everything works fine!

The only difference between these two laptops is that old laptop had old versions of TB and addon, which have been updated automatically over time, and on this laptop everything works fine.

On my new laptop, I have installed fresh version of TB 68.4.2 and latest version of addon. TB has updated automatically to 68.5.0 after installation. I have imported my profiles by copying folders from old laptop to new laptop.

I have tried to remove everything on my new laptop, install fresh TB 68.5.0 and gContactSync 3.1.7 without any profile migration, but problem still exists in fresh install. The only thing is that I have new record - 1543 contacts :) But I still miss around 400 contacts.

Loading of contacts is not slow, it goes pretty fast always, but it simply stucks at some point, usualy around 1300-1400 contacts.

EDIT:

I have tried to login with different google account, that has only 850 contacts, and everything works fine! I have tried several times to click on "Sync" and everytime I get "gContactSync Notification" window with summary.

So my conclusion is that problem exists only for accounts with larger number of contacts. As martinsydsin said, it seems that some kind of timeout happens. As I have measured, timeout occurs after 30 seconds exactly (after that time counter of imported contacts in statusbar stops counting).

But it is still mystery to me how is it possible that everything runs fine on my old laptop, with same versions of TB and gContactSync.

What could possibly be solution here?

EDIT 2:

Yes, it is definitely 30 seconds limitation for "Sync" process to ends. If contacts are synced within 30 seconds - everything will be fine, I will get "gContactSync Notification" window with summary (how much contacts have beed added, updated etc.). But if process lasts for more than 30 seconds, it will just stop, without displaying "gContactSync Notification" window with summary.

I have tried this for example: Installed old version of TB (60) and old version of addon (I think 2.1.13). I have successfully synced contacts (all 1896 contacts) and after that my TB has automatically updated to latest version (68.5.0). After that, I had to update gContactSync also. I have tried to click on "Sync" and after 26 seconds I have got "gContactSync Notification" window with summary. But that worked only first time. Second time I have tried and it obviously lasted more than 30 seconds, and no summary window at all. Third time (after TB restart) I got "gContactSync Notification" window with summary after around 25 seconds.

On my old laptop, which already have all contacts synced, I get "gContactSync Notification" window with summary after only 3-4 seconds after clicking on "Sync".

So, for some reason, on my freshly installed TB on new laptop, sync procedure is much slower, and if it lasts more than 30 seconds it will not finish successfully.

Both laptops are on same wifi network. Both have Windows 10, but older one have Windows 10 version 1903 (OS Build 18362.657) and new laptop have Windows 10 version 1909 (OS Build 18363.657)

I do not have explanation why this "sync interval" lasts so much longer on my new laptop, with same TB and gContactSync version, but 30 secons limit is obviously the problem here.

I hope that I gave some contribution in fixing this bug in future.

djzgib commented 4 years ago

I have found a cause and a solution! (at least works for me)

It was Windows Defender that was slowing down sync process!

After I have disabled "realtime protection" on my new laptop, suddenly sync works like a charm - in about 5 seconds everything is synced and I get that "gContactSync Notification" window with summary.

On my old laptop I have Avast antivirus, and I never had problems with contact syncing. That is why I got an idea today to try to disable Windows Defender on my new laptop, and it worked.

So I believe that I will just disable Windows Defender and install Avast on my new laptop and that will be solution for me, instead of reverting to combination of TB 60.9.1 + gContactSync 2.1.13 (which for some reason works OK even with Windows Defender turned on).

Mistral-75 commented 4 years ago

Disabling Windows Defender's real time protection, closing Thunderbird, opening Thunderbird and then sync-ing worked for me too: in a few seconds I got the 'gContactSync Notification' window with summary.

I have to disable Windows Defender's real time protection each and every time I want to sync.

KrasheninnikovMaxim commented 4 years ago

Add the log folder (C:\Users\ "User name" \AppData\Roaming\Thunderbird\Profiles\ "Profile name" \gcontactsync) to Windows Defender exceptions. Or turn off the logs in the Prefernces gContactSync.

Tripp339 commented 4 years ago

I've got the same issue. Not using Win Defender. My cout stops at 1500 and will sync no further. Frustrating. Tried all of the above but nothing works. I have about 2300+ contacts. Running TB ver 68.xxx Also the records seem to load randomly. Some transfer and some don't.

Phazako commented 4 years ago

Hope this helps-
This problem is still running with 68.12.1(32bit) and gContactSync 3.2.0. Running on Win10 Pro 1909

Phaz (God! Where did they get that picture of me from?)