dart-lang/dart-sublime-bundle — pull request #148 by guillermooo (2014-07-17 05:01:50+00:00)
Title: Improve I/O scheduling for linter

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
open Dart files.

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

#### Performance

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.
Results with expired tokens are discarded.

#### Experience

No output panel is shown if there are no errors.