Mailspring/spec-nylas
Ben Gotow 1e6e857f28 perf(*): Add indexes, optimize "shouldAcceptModel", optimize Tasks
Summary:
Consolidate the smarts from ChangeFolderTask into a generic ChangeMailTask

ChangeMailTask:
   - only makes requests for threads / messages that actually changed
   - handles incrementing / decrementing locks
   - writes changes to the database in a single pass, and only writes modified models
   - encapsulates the undo state that was built into ChangeFolderTask

This change means that ChangeLabelsTask enjoys the same "smarts" as ChangeFolderTask. Label changes resulting in no-ops do not create web requests, you can undo label changes and they go back to the correct previous state.

Replace "UpdateThreadsTask" and "UpdateNylasObjectsTask" with subclasses based on the same code used for folder/labels

This means that the naming and parameter sets are consistent for all thread/message changing tasks. It also means that starring/marking as use the same (tested) business logic and starring 999 already-starred threads doesn't create 999 requests.
Go away DraftCountStore - nobody wants you in secondary windows

Add "Debug query plans" option which prints out the steps the database is taking. Look for "SCAN" to now you're having a bad time.

Make "version" field queryable, when we receive deltas/API response, find all versions of existing models in a single query without loading or parsing the objects

Contact: Add index for lookup by email

Label: add index for lookup by name

Message: Add index for message body join table

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1840
2015-08-05 15:53:08 -07:00
..
components fix(contact-chips): Contact chips are editable and have much better style 2015-08-03 13:06:28 -07:00
fixtures Threads now sorted by receivedrecetndate 2015-07-28 14:03:55 -07:00
models fix(query): Properly escape single quotes in SQLite 2015-08-03 17:36:49 -07:00
stores perf(*): Add indexes, optimize "shouldAcceptModel", optimize Tasks 2015-08-05 15:53:08 -07:00
tasks perf(*): Add indexes, optimize "shouldAcceptModel", optimize Tasks 2015-08-05 15:53:08 -07:00
action-bridge-spec.coffee feat(logging): Developer bar, verbose logging to logstash, Electron 0.26.0 2015-05-19 17:02:46 -07:00
auto-update-manager-spec.coffee updater(*): Send current platform in update check, publish to S3 in /darwin/ folder 2015-06-30 11:03:24 -07:00
buffered-process-spec.coffee fix(tests): remove unnecessary failing test 2015-06-16 09:53:27 -07:00
clipboard-spec.coffee add(specs): +101 specs and 403 assertions from Atom 2015-06-02 19:51:00 -07:00
component-registry-spec.coffee feat(*): draft icon, misc fixes, and WorkspaceStore / custom toolbar in secondary windows 2015-06-03 16:02:19 -07:00
database-view-spec.coffee Threads now sorted by receivedrecetndate 2015-07-28 14:03:55 -07:00
dom-utils-spec.coffee fix(quoted-text): new system to remove quoted text 2015-07-21 11:34:47 -07:00
menu-manager-spec.coffee add(specs): +101 specs and 403 assertions from Atom 2015-06-02 19:51:00 -07:00
model-view-selection-spec.coffee fix(selection): Fix issue where selecting offscreen thread (null) could break selection 2015-06-01 18:29:39 -07:00
model-view-spec.coffee refactor(utils): switch to regular underscore 2015-05-19 16:06:59 -07:00
module-cache-spec.coffee add(specs): +101 specs and 403 assertions from Atom 2015-06-02 19:51:00 -07:00
nylas-protocol-handler-spec.coffee add(specs): +101 specs and 403 assertions from Atom 2015-06-02 19:51:00 -07:00
nylas-sync-worker-spec.coffee feat(draft-syncback): Sync drafts with Gmail (API does not support Exchange syncback) 2015-07-22 11:18:23 -07:00
package-manager-spec.coffee fix(test): remove bad nondeterministic package spec 2015-06-17 20:49:06 -07:00
package-spec.coffee add(specs): +101 specs and 403 assertions from Atom 2015-06-02 19:51:00 -07:00
quoted-html-parser-spec.coffee fix(quoted-text): new system to remove quoted text 2015-07-21 11:34:47 -07:00
quoted-plain-text-parser-spec.coffee feat(quoted-text): New quoted text engine 2015-07-08 09:51:33 -07:00
style-manager-spec.coffee add(specs): +101 specs and 403 assertions from Atom 2015-06-02 19:51:00 -07:00
styles-element-spec.coffee add(specs): +101 specs and 403 assertions from Atom 2015-06-02 19:51:00 -07:00
task-spec.coffee fix(build): Temporarily disable 'Task' tests Jenkins can't run, and avoid empty ui-variables files 2015-06-03 12:04:43 -07:00
test_utils.coffee fix(asar): Support ASAR, and running of specs in prod builds 2015-05-21 14:41:30 -07:00
theme-manager-spec.coffee fix(specs): silence noisy specs and fix warnings 2015-06-15 18:29:59 -07:00
undo-manager-spec.coffee fix(composer): polish composer edge cases 2015-05-19 16:12:39 -07:00
utils-spec.coffee Fixed bug where items in sent folder have "invalid date" 2015-07-31 08:23:03 -07:00