This project is read-only.

Auto format (CTRL K + D) freezes visual studio

Apr 5, 2014 at 3:57 PM
Since beta (?), the visual studio freezes on code formatting for a few seconds on large files.
It works fine, with the default javascript editor (Open with, Source Code (Text) Editor)).

Is this only a configuration issue or something more?
Apr 7, 2014 at 10:14 PM
thx. how large is the file that you are formatting?

is also slow on the 2nd formatting?

we're using TS's formatter btw. would be nice to get some telemetry & report back to them.
Apr 8, 2014 at 3:50 PM
You can get as reference file.
on my setup, it freezes for > 15s when i press the auto format shortcut, and yes, it's also slow on the 2nd formatting.
I have tried to disable all third party plugins, but it doesn't seem to have any effect.

Currently, i play a little with the editor, for now i have only the following issue on the screenshot
(The auto indentation doesn't work as excepted like the default editor):
Apr 22, 2014 at 6:19 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Apr 22, 2014 at 6:21 PM
Thanks for the report, I'm able to repro it and I've opened an issue for this. This is one of two things:

To do the reformatting we're actually using TypeScript's formatting services, but TypeScript has since shipped TypeScript 1.0 and we aren't up to date. So there could be some issues in the version of TypeScript we include in NTVS.

The issue could also be that we're running in different JavaScript engines, so we might need to move this out-of-proc and run the formatting in Node which should dramatically speed it up. Either way I expect it to be fixed for the next release.