Summary: - Use a sub-select query with much better performance to display the thread list - Perform analyze on tables after launch The new query is: ``` SELECT `Thread`.`data` FROM `Thread` WHERE `Thread`.`id` IN (SELECT `id` FROM `ThreadCategory` AS `M26` WHERE `M26`.`value` IN ('9m9ks71k06n5rmx82kgues09p','9s9k25q6j1krjgpkovbcjm7d','13b7ufruoymvih07ki0uahlto','dtmhlzz6phr47zp512knhjgf8','16dvjb84bszfh15kgfrjj37i3','aclwmgncdqjfibp51bvgbeik','17qad7jhbp6tozog3klm5zagt','4x4bkbawiq825u4eu3aus8tll','7axr9f5f1lzpwm2rw2ghkirhq','dsnn660af0pmou2gg3nstga8a','361qr5rva1ieby2r0ec3sn0bm','10fyvba7pjyjgeyr5i65i1zri') AND `M26`.`in_all_mail` = 1 ORDER BY `M26`.`last_message_received_timestamp` DESC LIMIT 200 OFFSET 0) ORDER BY `Thread`.`last_message_received_timestamp` DESC; ` 0|0|0|SEARCH TABLE Thread USING INDEX Thread_id (id=?) 0|0|0|EXECUTE LIST SUBQUERY 1 1|0|0|SCAN TABLE Thread-Category AS M26 USING COVERING INDEX ThreadFancyIndex 1|0|0|EXECUTE LIST SUBQUERY 2 0|0|0|USE TEMP B-TREE FOR (only on 200 result items) ``` Which is twice as performant as: ``` SELECT `Thread`.`data` FROM `Thread` INNER JOIN `ThreadCategory` AS `M26` ON `M26`.`id` = `Thread`.`id` WHERE `M26`.`value` IN ('9m9ks71k06n5rmx82kgues09p','9s9k25q6j1krjgpkovbcjm7d','13b7ufruoymvih07ki0uahlto','dtmhlzz6phr47zp512knhjgf8','16dvjb84bszfh15kgfrjj37i3','aclwmgncdqjfibp51bvgbeik','17qad7jhbp6tozog3klm5zagt','4x4bkbawiq825u4eu3aus8tll','7axr9f5f1lzpwm2rw2ghkirhq','361qr5rva1ieby2r0ec3sn0bm','10fyvba7pjyjgeyr5i65i1zri') AND `M26`.`in_all_mail` = 1 ORDER BY `M26`.`last_message_received_timestamp` DESC LIMIT 200 OFFSET 0; 0|0|1|SCAN TABLE Thread-Category AS M26 USING COVERING INDEX ThreadFancyIndex 0|0|0|EXECUTE LIST SUBQUERY 1 0|1|0|SEARCH TABLE Thread USING INDEX Thread_id (id=?) ``` Test Plan: Broken! Reviewers: evan, juan Reviewed By: juan Differential Revision: https://phab.nylas.com/D2869 |
||
---|---|---|
apm | ||
build | ||
docs | ||
dot-nylas | ||
examples | ||
internal_packages | ||
keymaps | ||
menus | ||
script | ||
spec | ||
spec_integration | ||
src | ||
static | ||
.eslintrc | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
appveyor.yml | ||
CHANGELOG.md | ||
CONFIGURATION.md | ||
CONTRIBUTING.md | ||
ISSUE_TEMPLATE.md | ||
LICENSE.md | ||
N1.sh | ||
package.json | ||
README.md |
N1 is an open-source mail client built on the modern web with Electron, React, and Flux. It is designed to be extensible, so it's easy to create new experiences and workflows around email. N1 is built on the Nylas Sync Engine which is also open source free software.

Want help build the future of email? Nylas is hiring!
Download N1
You can download compiled versions of N1 for Windows, Mac OS X, and Linux (.deb) from https://nylas.com/N1. You can also build and run N1 on Fedora. A Fedora distribution is coming soon!
Build A Plugin
Plugins lie at the heart of N1 and give it its powerful features. Building your own plugins allows you to integrate the app with other tools, experiment with new workflows, and more. Follow the Getting Started guide to write your first plugin in 5 minutes. To create your own theme, go to our Theme Starter guide.
If you would like to run the N1 source and contribute, check out our contributing guide.
Plugin List
We're working on building a plugin index that makes it super easy to add them to N1. For now, check out the list below! (Feel free to submit a PR if you build a plugin and want it featured here.)
Bundled Themes
- Dark
- Darkside (designed by Jamie Wilson)
- Taiga (designed by Noah Buscher)
- Ubuntu (designed by Ahmed Elhanafy)
Community Themes
- Arc Dark
- Predawn
- ElementaryOS
- Ido — Polymail-inspired theme
- Solarized Dark
- Berend
- LevelUp
- Sunrise
- Less Is More
- ToogaBooga
- Material
- Monokai
Bundled Plugins
Great starting points for creating your own plugins!
- Translate — Works with 10 languages
- Scheduler — Show your availability to schedule a meeting with someone
- Quick Replies — Send emails faster with templates
- Send Later — Schedule your emails to be sent at a later time
- Open Tracking — See if your emails have been read
- Link Tracking — See if your links have been clicked
- Emoji Keyboard — Insert emoji by typing a colon (:) followed by the name of an emoji symbol
- GitHub Sidebar Info
- View on GitHub
- Personal Level Indicators
- Phishing Detection
Community Plugins
- Jiffy — Insert animated GIFs
- Weather
- Todoist
- Unsubscribe
- Squirt Speed Reader
- In Development: Cypher (PGP Encryption)
Running Locally
By default the N1 source points to our hosted version of the Nylas Sync Engine; however, the Sync Engine is open source and you can run it yourself.
Feature Requests / Plugin Ideas
Have an idea for a package, or a feature you'd love to see in N1? Check out our public Trello board to contribute your thoughts and vote on existing ideas.