dart-lang/dart-sublime-bundle — pull request #147 by guillermooo (2014-07-16 21:40:43+00:00)
Title: Linter

This a work in progress and **not ready for merging**.

The linter, while extremely useful, offers a rough experience and slows ST down in some scenarios — especially if you switch to a project with many Dart files open.

This PR addresses the perf problem and some user experience issues, mainly:

Now there is a *producer* thread and a *consumer* thread exchanging error data. They communicate via a synchronized queue.

The *error producer* fires when a view is activated or saved. I've disabled linting *on_loaded* because it was causing serious perf degradation.

The *error consumer* goes about its business in intervals. It checks the queue for new items and acts upon them. Since it's an async communication, a token and a buffer id is passed along with error data to identify the most current lint operation for the buffer underlying the current view.

All in all, I'm observing better performance and a less intrusive experience.

There's some refactoring left to be done and it'd be great if others could test this branch and share their opinion.