To really make Nylas compelling over Gmail, and also to replace Thunderbird, here's what I think needs to happen:
1. Bundle Sync Engine and N1 into a single program.
2. Implement local search. Faster than IMAP search and doesn't rely on a network connection.
(As it stands, Nylas requires an internet connection to work. As long as that's the case it's no Thunderbird replacement at all, and will have a v hard time winning over Gmail users.)
The good news is that both Sync Engine and N1 are GPLv3, so it's totally possible. The bad news is complexity:
* Sync Engine is written in Python and uses MySQL for persistence
* N1 is built with Coffeescript + React + Electron, and uses SQLite for persistence
So we need to simplify. We can't just bundle all that into an app, it would be a monstrosity. Here's how I think we could do it instead:
* Use Sync Engine as the basis for a Node library for IMAP sync
* Use the SQLite full-text feature (fts4) for search
That way you'd have a single Electron app with all persistence in SQLite.
I'm prototyping this now. Thoughts? Let me know if you have ideas or want to help!
Search is definitely an area we can make dramatic improvements, and we're working on it.
Having a server communicate with IMAP (which is slow), cache the results, and export a more efficient/log-structured alternative probably makes syncing client computers much faster.
The sync engine handles all the compatibility or dozens of IMAP and Exchange servers, and uses a variety of heuristics for real-time notifications. It also does the heavy-lifting for the huge amount of data in most people's mailbox. The N1 app can cache your entire archive in about 10% of the disk space required if you also download all unprocessed headers+attachments.
Right now our search implementation just sends a proxy request to the IMAP search, so you'll get the same performance as Gmail web, Mac Mail, etc. It's not ideal. We're working on our own faster search system, but it's tough to build a huge distributed search cluster that handles tens of terabytes. (And is growing quickly!) If anyone here wants to work on that, we're also hiring. ;)
N1 is built on Electron, which under the hood is Chromium+NodeJS so that comes with a bit of weight. But the app itself is pretty manageable. You can check out the source here: https://github.com/nylas/n1
I believe the sync engine translates between IMAP and a custom JSON protocol they've created. I'm not sure what the performance difference is, but looking at the API docs, it looks a lot nicer to work with than IMAP: https://www.nylas.com/docs/
It also seems to more accurately represent modern semantics for working with email. For example, it allows using OAuth for authentication, and it has separate fields for folders and labels, depending on the backing email service. (And unlike IMAP, the labels field is actually useful.) You can also download a transaction log to make sync faster, which I don't think has an analog in IMAP.
Subjectively, I've found the performance to be rather snappy in most cases.
(You can also run a local client of the sync engine, if you don't want to trust their hosted copy: https://github.com/nylas/sync-engine)