Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NTVS 1.2 Feedback: Very slow and lost custom editor formatting #1105

Closed
bartonsprings opened this issue Jun 27, 2016 · 20 comments
Closed

NTVS 1.2 Feedback: Very slow and lost custom editor formatting #1105

bartonsprings opened this issue Jun 27, 2016 · 20 comments

Comments

@bartonsprings
Copy link

I have few 100K+ lines of code and was working fast and great with previous version of NTVS but now I have following issues. Note that my system is quad core, Core i7, 16GB, SSD with VS2015 community edition etc..

  1. On enabling ES6, the system crawls
  2. Lost all the custom formatting for nodeJs projects for editor on enabling ES6
  3. Had to go back and disable ES6 and back to ES5. Unusable with ES6
  4. Overall the experience of developing is sluggish with new version

It could be another plugin creating these issues but there is a definite cause and effect on enabling and disabling ES6 for sure!

@mjbvz
Copy link
Contributor

mjbvz commented Jun 27, 2016

Thanks for the feedback. It's interesting that switching from ES6 to ES5 IntelliSense fixes things, usually we see the opposite :)

Do you only see these performance problems in ES6? I'd like to understand if the root cause is something in the NTVS code or in one of our dependencies. Our ES6 IntelliSense experience is powered by the Typescript Salsa project and they have been working hard to support our Node.js use cases as well, but you could be running into an edge case. I'm sure they'd be interested in learning more about the issue.

The lack of custom formatting also seems to related to Typescript / Salsa and is being tracked here: #988

@mjbvz
Copy link
Contributor

mjbvz commented Jun 27, 2016

Whoops, #988 is probably unrelated. I saw formatting and thought text formatting, not code formatting which I believe is what you were actually referring to.

Which custom formatting settings stopped working for you, all of them? What happens if you go back an try setting these again (unchecking and rechecking the boxes)?

@bartonsprings
Copy link
Author

Thanks for the response.

This is what it looks like for ES5 (based on setup in the Fonts and Colors for the editor). This is the correct scenario:

image

With the following ES5 setting:
image

This is what happens when ES6 is turned ON. All the NodeJs editor settings for colors are lost
image

You can see how the dots, braces etc have lost colors. There are many other formats that are lost.

BTW, you can see this only after restarting VS2015. It won't manifest itself for the same session.

Thanks!

@mjbvz
Copy link
Contributor

mjbvz commented Jun 28, 2016

Ok, since it's the custom text colors that are being lost, #988 is the issue tracking this problem. I'll take another look at the issue to see if there's anything NTVS can do.

We've also reached out to the Typescript team to let them know about the performance issues you are seeing. Are you able to share your code by chance to help us get a repo? If not, could you let me know roughly what your solution looks like: how many projects are in the solution, how many files per project, average JavaScript file size. And are you including any external code files (such as node_modules or a build script output directory) in your visual studio projects?

Thanks.

@mjbvz
Copy link
Contributor

mjbvz commented Jun 28, 2016

For the coloration issues, the Typescript editor uses different colorization properties than our ES5 text editor. The settings are coarser, but here's a mapping from the ES5 IntelliSense colors to ES6 IntelliSense colors:

  • Node.js comma -> Punctuation
  • Node.js dot -> Punctuation
  • Node.js grouping -> Punctuation
  • Node.js operator -> Operator

This means that grouping, dot, and comma will always have the same color, but at least you can customize this color. We may want to follow up with Typescript to request Typescript/Javascript specific colorization options, along with some more granular settings.

@bartonsprings
Copy link
Author

Thank you for the workaround. Really appreciate your quick review of the issue.

I really needed the custom color formats so I will stick with ES5 till this issue is resolved. Great product though.

Some facts about the solution:

  1. It has only 3 big projects inside the solution
  2. All the backend nodeJs code is in single project
  3. The node project code base is in access of 200K line
  4. Number of files is close to 100+
  5. I use npm modules local to my system based on my pacakge.json
  6. The size and number of files for the node modules is not part of the above files or project code

I wish I could provide the repo but since it is protected and confidential propitiatory company code base, I cannot upload it.

Is this project size in your opinion too small, average or big? Should I break it into smaller projects?

Thank you so much again!

@mjbvz mjbvz added the external label Jun 29, 2016
@mjbvz
Copy link
Contributor

mjbvz commented Jun 29, 2016

Thanks for this information.

Node projects are often broken into lots of tiny projects/modules, so your project is a bit large comparatively, but this is a normal use case that we should support better. We're doing some performance investigations now, and I'll forward the general project info you provided along to the Typescript team so they can continue their investigation as well.

@mousetraps mousetraps mentioned this issue Jun 29, 2016
11 tasks
@bartonsprings
Copy link
Author

Thanks. Appreciate your feedback and help.

@bartonsprings
Copy link
Author

The new VS update with NTVS is unbearably slow. Keeps doing analysis and cannot type for seconds in a row. Almost made my environment unusable now. The intellisense is set at "quick" setting.

image

If I turn off intellisense, I lose the outlining of code etc. I may have to move to sublime or some other environment because VS environment is getting loaded with features but productively unusable. Hope MSFT nodejs team looks at this issue.

@bartonsprings
Copy link
Author

bartonsprings commented Jul 19, 2016

I have a 16GB system and VS is already chewing up almost 3GB of RAM with NTVS!
Also, I have superfast SSD in the system. No rotating media.

@bartonsprings
Copy link
Author

bartonsprings commented Jul 19, 2016

Some more status bar info while freezes:
image

@mjbvz
Copy link
Contributor

mjbvz commented Jul 19, 2016

@bartonsprings It seems that you are using our old ES5 IntelliSense engine, which has been the source of no end of performance problems and crashes. With 1.2, we now default to an IntelliSense engine powered by Typescript which is much more stable and performant, even though it means regressing some functionality, such as font and coloring support.

Again, I highly recommend against using the old IntelliSense engine for these reason. Please try switching to our modern ES6 IntelliSense experience and let us know if you run into performance problems with it. Thanks

@bartonsprings
Copy link
Author

Thanks Matt for the feedback. Unfortunately, we are now in a situation to select between two customer experience/productivity issues on NTVS just because we moved to a new version. As much as we would like to go to ES6, having complete loss of NodeJS syntax coloring is not acceptable for developers.

Would you know of issues if we simply revert to older version of NTVS. Unfortunately moving up to 1.2 version did not work out well for us. The version we were using earlier did not have all these issues. So something went bad in version 1.2. Is there an estimate on how difficult and timing for the fix for NodeJs editor syntax coloring? This is just an honest question. I understand that NTVS possibly may not be the big focus for MSFT but we have too much vested in NodeJs development and wrestling with environment is getting counter-productive so we are looking at options which are simple, fast and focused.

Thanks again for helping out and all the work to advance the open source technologies.

@mjbvz
Copy link
Contributor

mjbvz commented Jul 20, 2016

I can't be 100% sure, but moving back to NTVS 1.1 will not resolve these problems. The most important difference between NTVS 1.1 and 1.2, is that 1.1 defaults to using our ES5 static analysis engine for IntelliSense, the same static analysis engine that was causing the performance problems you saw. These perf issues don't happen 100% of the time, but they are far, far more common when using the old analysis engine.

Besides defaulting to a new IntelliSense engine, NTVS 1.2 also includes a number of other important stability and performance improvements. In general, 1.2 is going to offer a better experience all around, whether you are using the old ES5 IntelliSense or our modern ES6 IntelliSense.

The regression I mentioned is not between NTVS 1.1 and 1.2, but between the ES5 IntelliSense engine and ES6 IntelliSense. The new IntelliSense is powered by Typescript, and they are still working to support some of the scenarios that we used to handle. Here's the Typescript issue tracking part of the font issue for example: microsoft/TypeScript#5250

Typescript would also need to add support for custom colored brackets and for other syntax elements, which is not supported currently. If you really need this feature and want to help out other developers too, feel free to look into contributing this to the Typescript project. The Typescript team has their own priorities right now, so I do not have any sense for when this fix could be implemented. Reporting the issue to Typescript and driving it is the best way to get it implemented. Please let me know if you would like any help getting started with this.

@bartonsprings
Copy link
Author

Matt,
I enabled ES6 again per your request just now because the constant freezing just made NTVS 1.2 completely unusable. But even the brace completion is not working now. Also, the brace match highlight is also not working.

Are these known bugs? Basically I am using VS15 only as a development environment for open source technologies and seems like I am hitting my head on the wall for very basic and elementary features of an editor what I am using it for. All other tools are open source. I am sure I may be doing something wrong. Please help!

Thanks.

@bartonsprings
Copy link
Author

I would love to contribute to Typescript project but I have no clue what this project is and I have no experience in Typescript. Just note that I have trying to use very elementary and basic features of an code editor. Font, color syntax and braces :)

@mjbvz
Copy link
Contributor

mjbvz commented Jul 20, 2016

Yes, the brace completion is another known regression. We're tracking that with #1142, but the root cause is also Typescript.

Microsoft's Typescript project consists of both the Typescript programming language, and the tooling that supports it. We moved to this tooling to power our IntelliSense because it has an entire team supporting it and will offer a better, more consistent experience with other Microsoft products. But it is a newer project, so we are still working on sorting out some of the basic editor features.


If you are just looking for a basic editor and don't need to integrate with existing Visual Studio projects and are not tied to aVisual Studio workflow, I highly recommend trying out Visual Studio Code. It's Microsoft's lightweight, open source, cross platform IDE and offers good Node.js support. VSCode should support all the features you mention and much more. It may be just what you are looking for.

@bartonsprings
Copy link
Author

Ok. Thanks. I will watch out for the fixes. I will also try the VS Code.
-------- Original message --------From: Matt Bierner notifications@github.com Date: 7/20/16 12:46 PM (GMT-06:00) To: Microsoft/nodejstools nodejstools@noreply.github.com Cc: bartonsprings bartonsprings2@gmail.com, Mention mention@noreply.github.com Subject: Re: [Microsoft/nodejstools] NTVS 1.2 Feedback: Very slow and lost custom editor formatting (#1105)
Yes, the brace completion is another known regression. We're tracking that with #1142, but the root cause is also Typescript.

Microsoft's Typescript project consists of both the Typescript programming language, and the tooling that supports it. We moved to this tooling to power our IntelliSense because it has an entire team supporting it and will offer a better, more consistent experience with other Microsoft products. But it is a newer project, so we are still working on sorting out some of the basic editor features.

If you are just looking for a basic editor and don't need to integrate with existing Visual Studio projects and are not tied to aVisual Studio workflow, I highly recommend trying out Visual Studio Code. It's Microsoft's lightweight, open source, cross platform IDE and offers good Node.js support. VSCOde should support all the features you mention and much more. It may be just what you are looking for.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@craigbrett17
Copy link

I'm running into major perf issues with NTVS 1.2 as well. Frequent VS crashes ever since I installed it.

In my case, I have a small solution with 2 node projects, an API on the back end an Aurelia front end. Nothing too frightneing size wise as it's fairly new.

As is, it is hard to use and I'm considering going back to working VS working in website mode and using the command line manually and using node debug, it's that desperate (I can't use the Chrome debugger as it's not accessible).

Would I get a boost if I flipped back to using ES5 intellisense? I'm even considering just turning it off if I can... intellisense wasn't my main use case for using NTVS

@paulvanbrenk
Copy link
Contributor

This should be a lot better in 1.3 for Visual Studio 2015, and for Visual Studio 2017 in general.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants