TbSync icon indicating copy to clipboard operation
TbSync copied to clipboard

Sync FolderList only on manual sync request, not on auto sync.

Open pk1234 opened this issue 5 years ago • 6 comments

Your environment

TbSync version: 2.11 Thunderbird version: 68.2.2

[X] Yes, I have installed the latest available (beta) version from https://github.com/jobisoft/TbSync/releases and my issue is not yet fixed, I can still reproduce it.

We are using a central address book with approx 10.000 entries and our main problem is performance. CardBook is nice but synchronizing 10.000 entries needs a lot of time and freezes thunderbird for multiple minutes. And with CardBook this happens on every synchronization.

Congratulation to the TBsync-programmers: Initial sync of 10.000 entries lasts a couple of minutes as well, but you are using a sync-token and after initial sync has happened the duration of every following sync will depend on the amount of entries that were added/changed/deleted. This will last less than one second.

Unfortunately you are synchronising the folderlist as well on every sync. And this lasts approx. one minute since we have lots of principals with lots of folders.

I don't think that the folderlist should be synchronized automatically. Instead only the contents of address books should be synchronized automatically and the folderlist should be synchronized only if the user demands reloading of this list.

So my suggestion is to exclude the folderlist from automatic synchronization and add a "Reload Folderlist"-button to the TBsync configuration GUI instead.

Kind regards and much thanks for this wonderful TB-AddOn

Peter

PS: let me know if you need logging information.

pk1234 avatar Feb 28 '20 14:02 pk1234

So "Sync FolderList only on manual sync request, not on auto sync." would describe your request correctly?

jobisoft avatar Feb 28 '20 15:02 jobisoft

Almost - What I'm suggesting is to not reload the folderlist during manual or automatic syncronization but to add a separate button to the configuration GUI that will reload the folderlist.

Since our central addressbook changes very rarely this would speedup automatic syncs dramatically. With our setup reloading the folderlist lasts approximately one minute while syncronizing an addressbook-entry last less than a second. You are working on a feature that will trigger an automatic sync whenever a local addressbook entry was changed. This does not make sense if an automatic sync lasts one minute, even when only a single addressbook entry has changed.

On the other hand, if the folderlist has changed than this information is of use only if the configuration gui was opened by the user and the user wants to decide wether he wants to use a new addressbook or not.

Kind regard

Peter

pk1234 avatar Feb 28 '20 21:02 pk1234

I will not add a second button for various reasons. It does not fit my philosophy.

If the user opens the Manager UI and hits the sync button, it will always sync the FolderList, this is intended by design.

I do see the need to sync changes without going thru the entire sync chain including the FolderList, I thus proposed to sync only the selected resources during automatic sync (every x minutes as defined by the user) and only the changed resource on instant sync (which is not yet implemented).

What I have not understood: Why is this important to you? Sync is usually happening in the background without you having to wait for it. Why do you actually look at the sync process and wait for it to finish?

jobisoft avatar Feb 28 '20 22:02 jobisoft

Reloading the folderlist from the Manger UI is no problem for us. If you add another Sync-Button to the toolbar (as suggested in #360) then my suggestion is that this button should also not sync the folderlist.

My main concern is performace. Our central addressbook has approx 10.000 entries and this addressbook should be used by hundreds of users. Syncing the content of a single addressbook just requires a single request (no matter how big the addressbook is). Since our central addressbook is rarely changed most of the time the server will just return the current sync-token. If every user does one sync request per hour this causes U requests per hour (if U is the number of users). Reloading the folderlist causes a lot of requests to be sent to our server (I'm observing 4 reqeust per user since TBsync seems to fetch a list of principals and then request the addressbooks of every principal). So every sync causes 4U requests. So if every user does one sync per hour this causes 4U*U requests per hour. This hurts our server when U>1000 or people doing auto-sync every 5 minutes.

Also Thunderbird becomes unresponsive duing sync. For example Thunderbird needs 15 seconds to start without TBsync and >60 second with TBsync enabled.

If our user change a single entry within the address book and then do a sync they expect the single entry to be sent to the server in less than one second.

Peter

PS: let me know, if I can help. If money helps, then you might send us an invoice.

pk1234 avatar Mar 01 '20 14:03 pk1234

Reloading the folderlist from the Manger UI is no problem for us. If you add another Sync-Button to the toolbar (as suggested in #360) then my suggestion is that this button should also not sync the folderlist.

Yes, that is how this would be implemented.

My main concern is performace.

Understood.

If our user change a single entry within the address book and then do a sync they expect the single entry to be sent to the server in less than one second.

We will get there.

March is pretty much fully booked. If you want this implemented with higher priority and help me to survive, we can make some sort of arragement for sure. Contact me directly via email (listed at my main github page).

jobisoft avatar Mar 01 '20 17:03 jobisoft

Shifted this to TB78. I am still in need for support (now more than ever), so if you still offer to support me, feel free to contact me. Thank you!

jobisoft avatar Jun 15 '20 21:06 jobisoft

Switching to native CardDAV sync, which should fix this.

jobisoft avatar Sep 21 '22 08:09 jobisoft