Mailspring/internal_packages
Evan Morikawa 652eaeff2a fix(composer): performance improvement in composer
Summary:
The issue was that on every key stroke the whole composer, participants
and all, were getting re-rendered. According to React.perf, the
`TokenizingTextField`s were taking a very long time to render and never
changing. This was fixed by adding a simple `shouldComponentUpdate` check.

The composer also has several regions that only change when the `props`
do. These are now cached. The cache reset when the `props` do.

After all of that, rendering the whole composer still takes 20-40ms. If
you're tying in the composer very quickly, text entry can approach that
render time. This starts to stack multiple React rendering passes up and
bogs the whole system down.

Luckily, we can simply render the composer less frequently. Now, after
changes are persisted to the `DraftStoreProxy`, we simply debounce the
proxy `trigger`. The users don't see this because the native
`contenteditable` field will update immediately. When the debounced proxy
trigger fires, it will transparently update the view to the latest state.

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: mg

Differential Revision: https://phab.nylas.com/D1749
2015-07-16 10:41:04 -04:00
..
account-sidebar fix(back): Remove "Back to " prefix, centralize into back button itself, align using vertial-align instead of margin-top 2015-07-13 16:33:57 -07:00
attachments fix(drag-n-drop): Remove react-dnd, display dropzone, allow tokens to be dragged out of app as plaintext 2015-07-15 20:06:11 -07:00
calendar-bar refactor(utils): switch to regular underscore 2015-05-19 16:06:59 -07:00
composer fix(composer): performance improvement in composer 2015-07-16 10:41:04 -04:00
composer-signature feat(signatures): Initial signature support 2015-07-14 12:20:06 -07:00
developer-bar feat(offline-mode, undo-redo): Tasks handle network errors better and retry, undo/redo based on tasks 2015-07-07 13:38:53 -04:00
file-list feat(attachments): Tons of tiny fixes to attachments, drag-and-drop attachments to other apps 2015-07-15 13:15:05 -07:00
inbox-contact-elements fix(draft-list): Nesting of participants class name causing problems 2015-07-15 16:48:26 -07:00
message-list fix(drag-n-drop): Remove react-dnd, display dropzone, allow tokens to be dragged out of app as plaintext 2015-07-15 20:06:11 -07:00
message-templates feat(salesforce): new UI for Salesforce 2015-06-17 20:40:08 -07:00
mode-switch fix(assets): New toolbar icons, shadows to achieve less heavy edges on messages 2015-06-26 10:38:07 -07:00
notification-mailto refactor(utils): switch to regular underscore 2015-05-19 16:06:59 -07:00
notification-update-available fix(notifications): Give notifications tag like HTML5 Notifications so you can de-dupe 2015-05-25 10:27:36 -07:00
notifications fix(*): can select participant with space if it's an email 2015-07-13 10:25:30 -04:00
onboarding feat(api): add api-experimental.nylas.com as login option 2015-07-08 13:25:11 -07:00
search-bar fix(search): remove red search x 2015-06-18 09:43:18 -07:00
settings fix(getting-started): New menu item, sample package for devs 2015-07-06 14:23:51 -04:00
sidebar-fullcontact feat(salesforce): new UI for Salesforce 2015-06-17 20:40:08 -07:00
sidebar-inbox-internal Adding ATag component which prevents <a> tags from taking over edgehill when clicked. 2015-06-25 10:28:31 -07:00
thread-list fix(back): Remove "Back to " prefix, centralize into back button itself, align using vertial-align instead of margin-top 2015-07-13 16:33:57 -07:00
today fix(nylas-api): Globally handle 401s and notify user they need to sign in 2015-06-17 12:29:49 -07:00
tooltip fix(tooltip): change tooltip delay to 2 seconds 2015-07-15 14:59:14 -04:00
ui-dark feat(theming): Definitely not hacker mode. I don't know what you're talking about. 2015-06-05 11:40:44 -07:00
ui-light fix(build): Temporarily disable 'Task' tests Jenkins can't run, and avoid empty ui-variables files 2015-06-03 12:04:43 -07:00
unread-notifications Separate notifications if less than five 2015-07-15 13:18:10 -07:00