fsprojects/VisualFSharpPowerTools — pull request #852 by vasily-kirichenko (2014-11-10 08:35:12+00:00)
Title: Two-staged colorization

It's based on `fix-printf-coloring`, so many changes here is irrelevant until that branch is merged.

The idea is as described by @dsyme here https://github.com/fsprojects/VisualFSharpPowerTools/issues/835#issuecomment-62307002

It works fine for the following scenario:

* change something in a file
* main colorization is updated quickly (1-2 seconds or less)
* unused symbol refreshed after a while (up to 10 seconds or more for some files)

However, while unused symbols are recalculating no other FCS functionality is available, which we cannot fix without big changes in FCS as @dsyme wrote:
> To enable automatic application of these colorizations, I think you will need to look at making changes to the FSharpChecker operations processing mechanism. Ideally the projects would be processed without clogging up the queue - which would mean **adapting the the incremental, interleaved process currently used to process the "current background project"**. It's not a trivial change though.

This PR also adds profiling into `SourceCodeClassifier`. It messes the code a bit, but I think we should keep it at least until we've fixed all the issues with colorization.