Mailspring/packages/local-sync/spec
Juan Tejada 83ef8c12b3 [local-sync] Restore global queue for message processing to improve perf
Summary:
Sync operations are mostly bound by I/O and the imap connection.
What we believe that is mostly affecting cpu and battery life is that node’s event
loop is being hosed with cpu intensive message processing operations.

To alleviate this, we do a few things:

- Restore a global message processing queue to process messages serially and meter cpu usage (message processing continues to be a fire and forget call from within sync operations)
- Move actual cpu intensive work to the message processing queue, i.e. `MessageFactory.parseFromImap`
- Keep track of message processing queue length, and skip sync operations if queue is too big to prevent massive memory consumption

This commit also renames the package from new-message-processor to
message-processor, given that now it processes both new and existing
messages, and we like to minimize confusion.

Test Plan: manual

Reviewers: spang, khamidou, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3602
2017-01-06 14:28:33 -08:00
..
fixtures fix(snippet-parsing): Don't add extraneous spaces after text format tags 2016-12-23 18:26:35 -08:00
imap [local-private, local-sync] temporarily disable specs 2016-12-15 12:57:24 -05:00
helpers.js [local-sync] Parse DOM to extract snippets 2016-12-13 16:32:22 -08:00
message-factory-spec.js [local-sync] Use mimelib to parse contacts 2016-12-29 15:48:12 -08:00
threading-spec.js [local-sync] Restore global queue for message processing to improve perf 2017-01-06 14:28:33 -08:00