-
Notifications
You must be signed in to change notification settings - Fork 236
Poor performance overall #317
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
Comments
@LPGhatguy Could you provide the following information to help us reproduce this issue:
|
It's on my work system and I'm at home, but here's some partial information:
I didn't check for errors in the console, but I can when I get in on Monday. The bare minimum project I got the error occurring on had:
|
I checked this morning and there are no errors, but I do see
every time I insert a semicolon with several libraries as dependencies. The only place I see that throws a message like that is |
I'm getting this same issue on my Windows 10 system at home, also with a bare minimum project. This project has the structure:
Where my tsconfig.json is just: {
"compilerOptions": {
"module": "system"
}
} |
This problem has gotten to the point where it's causing my editor to hang indefinitely when adding imports to a file. The editor resumes operation when I kill my Node executable. As a sidenote, this is using io.js 3.0, @hoanhtien. Here's an error log from after I kill the node process: http://hastebin.com/ezekacuhah.txt It appears that this is not related to the tsconfig.json file. |
Is it possible you can put out the small project somewhere that we can test on it? io.js might be the problem as we've been testing on node only. And judging from the error log, it keeps trying to config the formatting options, which happened before when people are using the 'vintage' mode. Are you using it by any chance? Thanks |
We had some perf issues with the module resolution logic. We just implemented a change on the TypeScript side to improve this significantly (see microsoft/TypeScript#4154 ). This will be in the TypeScript 1.6 release (or you could build TypeScript from master and take the tsserver.js from their to dogfood it now). |
I see no performance issue when editing https://github.com/LPGhatguy/basis/blob/master/src/server/main.ts on a machine with io.js v3.1.0. |
I haven't had any issues either since upgrading to io.js 3.1.0 -- perhaps it was one of the fabled memory leaks? |
I've hit more performance issues again. It seems to correspond with type completion dying. Could it be related to #348? There's a ton of I/O going on in the plugin it seems. I followed @billti 's suggestion and I'm running the latest 1.7-dev as my tsserver now, which seems to have solved a bunch of other issues as well. |
Can you show some of the I/O session that was recorded on your machine? |
Where would that I/O be logged by the plugin? The only indicator I had was a large number of temporary files in the plugin directory with open file handles (ie I couldn't delete them when Sublime was open). |
Oh I thought you meant a lot of command histories showed in the sublime console. Then #348 might be related, if that happens the same time with your perf issues. |
I was suffering from the same problems, sublime was hanging very often, my problem was solved by adding "node_modules" into tsconfig -> excludes. |
Nothing helps. Windows 7, node 4.3.2, bower 1.7.7, gulp CLI 1.2.1 |
I am seeing very poor performance when editing https://github.com/guardian/frontend/blob/master/static/src/deploys-radiator/app/main.ts. Sublime does not hang, but it takes about ~10 seconds for type information to appear in the toolbar when I select an identifier. Interestingly I see the same problem in VSCode. |
@OliverJAsh What is your TS version? I tried cloning the repo and open with the latest tsserver in TypeScript master, typing information pops up instantly though. |
@CatPlanet what is your tsconfig.json file content? |
@zhengbli I'm using the TS version that comes bundled with this plugin I believe? |
I am able to reproduce the slowness when I have the following code: var a = Promise.resolve('');
var n = Promise.all([
Promise.all([Promise.all([Promise.resolve('')])]),
Promise.all([Promise.all([Promise.resolve('')])]),
Promise.all([Promise.all([Promise.resolve('')])]),
Promise.all([Promise.all([Promise.resolve('')])]),
Promise.all([Promise.all([Promise.resolve('')])]),
Promise.all([Promise.all([Promise.resolve('')])]),
Promise.all([Promise.all([Promise.resolve('')])]),
Promise.all([Promise.all([Promise.resolve('')])]),
Promise.all([Promise.all([Promise.resolve('')])]),
Promise.all([Promise.all([Promise.resolve('')])]),
Promise.all([Promise.all([Promise.resolve('')])])
]);
n; Obviously this is a slightly contrived example, but the code I'm having trouble with does make heavy use of Promises. Tested in VSCode again and it seems fine, so I'll be using that for all TS projects now. |
@OliverJAsh I see the slowness you're talking about whenever I enter a semicolon, which freezes any typing. I believe you can set Otherwise, it does take surprisingly long to get quick info at a given location as well. |
I'm also seeing this. Having node with 100% CPU usage using this plugin with an Angular2 project on the basis of angular2-webpack-starter. After a while Sublime Text becomes unresponsive and freezes for a couple of seconds. The problems disappear when I disable the TypeScript plugin. It's been unusable for months and still is. OS X 10.11.5 |
@binarious @OliverJAsh so we have released a new version (0.1.14) with the auto_format disabled, do you still see the lag? |
@zhengbli Thank you. The freezing seems to be fixed, but autocompletion suggestions still take up to 5 secs and the method popup takes ~2 secs for me. |
do you use a tsconfig.json? is it the same one you use to build? if so can you run the compiler |
@mhegazy Yes I do. Here's the |
The time spent in the checker seems excessive. what version of tsc are you using? is there a chance you can share your project? do you see the same behavior on vscode? |
Also is it true that you have more than 2k files in your project? As most of the errors reported in the log are from the node_modules folder |
Well it seems to be fixed since I included this commit into my project just now: PatrickJS/PatrickJS-starter@8add16d
Maybe it was a problem with a wrong exclude rule that led to the parsing of the whole node_modules folder. Autocomplete suggestions are now almost instantly shown. Thank you for your time. |
I just ran into this issue tonight, when I try to change the selection it is unbearably sluggish. I brought up the Plugin Event Profile and
|
I'm running the Sublime Text 3 build 3083, latest stable, and I started getting extreme performance issues using this plugin.
When I have no
tsconfig.json
file, it looks like this plugin tries to parse all of my dependencies every time I type a semicolon, which stalls the entire text buffer. Adding anoParse
entry to atsconfig.json
file fixes this issue, and changes nothing about the resulting file completion.The text was updated successfully, but these errors were encountered: