Railk/T3S — pull request #63 by Phaiax (2014-06-13 15:36:59+00:00)
Title: Some improvements

Hey

I've worked a little bit on the code in the dev branch.

Former i had the problem, that there was a bunch of unexecuted showError commands in the async tss queue if I type a character just every debounce_delay seconds. Every showError takes 5-10 seconds on my project so it could easily take up to a minute until i could see the most recent errors. This took CPU time and slowed the builds also.

I did a lot, these are the main changes:
* still two instances of tss.js for each project (one for completions etc, one for the slow showErrors)
* but both of them are async now
* all commands are working with callbacks now, because there is no more synchron tss.js process
* commands in the tss.js execution queue will be reordered, so that a showErrors will always work with the newest data
* commands in the tss.js execution queue will be merged, so even if there are 3 showErrors in the queue, it will only be executed once
* debouncing still enabled: showErrors will wait 0.8 seconds after the last keystroke
* showErrors will only be executed if anything has changed on the open files.

This results in a much better responsiveness. Previously i had some delays (gui hang ups) on completion trigger etc, but now it works much smoother.

More changes:
* refactoring, renaming, documentation of some files
* Debug print statements in code

All these changes are working well with Linux and sublime 3.
When i'm done i can test it with sublime 2 (if they have a free version).
Can you test it in windows?

I'm open to any suggestions on my changes.

regargs, Dän