Mailspring/packages/local-sync
Mark Hahnenberg 59b5961a6c [syncback] Reuse currently open box if possible
Summary:
Previously we would unconditionally issue a SELECT when openBox was
called. Now we check if the currently open box is the one we want first and
return immediately if it is, avoiding the unnecessary SELECT (which can be
quite expensive on large folders like INBOX). We were also calling closeBox
after iterating all the messages in a thread to mark them as read/unread.
This was unnecessary and was causing extra SELECTs to be issued. Now we don't!
This diff is a 5x speedup over the old behavior when marking lots of
threads in the same folder as read all at once.

Test Plan: Run locally, measure perf with log statements

Reviewers: evan, juan

Reviewed By: evan, juan

Differential Revision: https://phab.nylas.com/D3654
2017-01-12 13:16:07 -08:00
..
images [dashboard] Put dashboard into work window 2016-11-28 18:02:42 -08:00
spec [local-sync] Give Nylas Mail messages a different Message-ID from API messages 2017-01-11 15:51:12 -08:00
src [syncback] Reuse currently open box if possible 2017-01-12 13:16:07 -08:00
stylesheets [💄] fix eslint issues before they get overwhelming 2016-12-01 15:37:48 -08:00
main.es6 [dashboard] Put dashboard into work window 2016-11-28 18:02:42 -08:00
package.json Update Nylas N1 to Nylas Mail 2017-01-12 11:25:39 -08:00