Mailspring/spec/stores
Ben Gotow 118761d79e perf(db): Lazily deserialize models on the other side of the action bridge
Summary:
We send database `trigger()` events through the ActionBrige to all windows of the app. This means that during initial sync, we're serializing, IPCing and unserializing thousands of models a minute x "N" windows.

This diff converts the payload of the trigger method into an actual class that implements a custom toJSON. It converts the impacted `objects` into a string, and doesn't deserialize them until it's asked.

Bottom line: this means that in many scenarios, we can avoid creating Contact models, etc. in composer windows only to broadcast them and then gc them.

Test Plan: No new tests yet, but this should definitel be tested. #willfix.

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2236
2015-11-06 11:15:20 -08:00
..
account-store-spec.coffee fix(specs): Clean up spec failures due to hot fixes prior to launch 2015-10-05 16:45:30 -07:00
contact-store-spec.coffee fix(spec): fix contact store spec 2015-10-22 14:13:51 -07:00
database-setup-query-builder-spec.coffee
database-store-spec.coffee perf(db): Lazily deserialize models on the other side of the action bridge 2015-11-06 11:15:20 -08:00
draft-store-proxy-spec.coffee fix(drafts): only syncback every 30 seconds instead of 5 seconds 2015-10-28 19:51:46 -04:00
draft-store-spec.coffee fix(tasks): don't continue if dependent task fails 2015-10-21 10:33:43 -07:00
file-download-store-spec.coffee fix(attachments): When downloads fail, don't resolve to chained actions 2015-10-05 17:57:24 -07:00
file-upload-store-spec.coffee fix(uploads): Display error when uploading >25MB files 2015-10-21 12:29:07 -07:00
focused-contacts-store-spec.coffee
focused-content-store-spec.coffee
focused-mail-view-store-spec.coffee
message-store-spec.coffee perf(message-store): Debounce reload of the message column—#249 2015-10-29 20:20:49 -07:00
task-queue-spec.coffee fix(tasks): don't continue if dependent task fails 2015-10-21 10:33:43 -07:00
unread-count-store-spec.coffee