Use a cached language service for emitting output to improve perf

* this makes the speed of emitting the output files very good (under 0.5
seconds)
* the hack for the markers is still necessary for now unfortunately