Make sure that we are at least using 16 workers for sync, otherwise
multiply the current sync worker count by 2.
Finally, this patch also logs the duration of the time it takes to
transfer all the messages from the server.
Revise syncing work distribution. Sync time can be reduced by up to 50%.
Rework the sync so that it pipelines better with bigger batch counts at
each stage. We now use 3 separate stages: Download, Updates and Sync.
The Download stage downloads messages in maxBatchSize intervals using
1.5x syncWorkers. Once the current batch has finished downloading it's
forwarded to the Updates stage and we proceed to download the next
batch.
The Update stage converts everything into gluon updates and prepares a
collection of noops that the sync stage can wait on for termination.
Finally the sync stage waits until the updates have been applied in
Gluon so that the vault information can be updated. We allow up to 4
pending wait operations to be queued currently to not block the
pipeline.
When we send a message, the send recorder records the sent message.
When the client then appends an identical message to the sent folder,
the deduplication works and instead returns the message ID of the
existing proton message, rather than creating a new message. Gluon is
expected to notice that it already has this message ID and perform
some deduplication stuff internally.
However, it can happen that gluon doesn't yet have this message ID,
because we haven't yet received the "Message Created" event from the
API. To prevent this, we poll the events after send and wait for all
new events to be applied.
There's still a chance that the event wasn't generated yet on the API
side. Not sure what we can do about this.
Other: fixed case issue in SSL member function names.
Other: removed 'restart' mention in SMTP and IMAP SSL settings.
GODT-1846: modified gRPC server to introduce ConnectionMode settings.
GODT-1846: implemented connection mode handling in bridge-gui.
GODT-1846: implemented error reporting in bridge-gui for connection mode.
Other: gathered all IMAP/SMTP server settings.
GODT-1846: wired IMAP/SMTP port change errors.
Other: Renamed some error events and signals.
Other: Fixed crash in IMAP restart when not started.
Other: dismiss port error notifications before changing ports.
Other: misc. fixes.