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

JS/TS project supporting large projects (1000+ files) #19326

Closed
mjbvz opened this issue Oct 19, 2017 · 18 comments
Closed

JS/TS project supporting large projects (1000+ files) #19326

mjbvz opened this issue Oct 19, 2017 · 18 comments
Labels
Needs More Info The issue still hasn't been fully clarified VS Code Tracked There is a VS Code equivalent to this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Oct 19, 2017

From @unional on October 3, 2017 22:36

VSCode: 1.16.1

Original discussion:
microsoft/vscode#9594

I followed this instruction: microsoft/vscode#9594 (comment)
But looking in tsserver.log, I don't see anything that stands out.

Info 0    [15:29:51.587] Binding...
Info 1    [15:29:51.617] request: {"seq":0,"type":"request","command":"configure","arguments":{"hostInfo":"vscode"}}
Info 2    [15:29:51.617] Host information vscode
Info 3    [15:29:51.618] response: {"seq":0,"type":"response","command":"configure","request_seq":0,"success":true}
Perf 4    [15:29:51.619] 0::configure: async elapsed time (in milliseconds) 1.7088
Info 5    [15:29:51.620] request: {"seq":1,"type":"request","command":"compilerOptionsForInferredProjects","arguments":{"options":{"module":"CommonJS","target":"ES6","allowSyntheticDefaultImports":true,"allowNonTsExtensions":true,"allowJs":true,"jsx":"Preserve","checkJs":false}}}
Perf 6    [15:29:51.620] 1::compilerOptionsForInferredProjects: elapsed time (in milliseconds) 0.6127
Info 7    [15:29:51.620] response: {"seq":0,"type":"response","command":"compilerOptionsForInferredProjects","request_seq":1,"success":true,"body":true}
Info 8    [15:29:51.621] request: {"seq":2,"type":"request","command":"open","arguments":{"file":"c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan/common/columns.js","fileContent":"/// <reference path=\"../../../custom-typings/panos-panos.d.ts\" />\n(function() {\n    Ext.ns('Pan.common');\n    Pan.common.columns = {\n        copy(baseColumnConfig, additionalProperties) {\n            return additionalProperties ?\n                Ext.apply({}, additionalProperties, baseColumnConfig) :\n                Ext.apply({}, baseColumnConfig)\n        }\n    }\n\n})();\n","scriptKindName":"JS","projectRootPath":"c:\\Users\\hwong\\p4\\feature\\fs4-kiev"}}
Info 9    [15:29:51.622] Search path: c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan/common
Info 10   [15:29:51.623] Config file name: c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/tsconfig.json
Info 11   [15:29:51.958] event: {"seq":0,"type":"event","event":"projectLanguageServiceState","body":{"projectName":"c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/tsconfig.json","languageServiceEnabled":false}}
Info 12   [15:29:54.281] Add recursive watcher for: c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/custom-typings
Info 13   [15:29:54.281] c for path c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/custom-typings not found in cache...
Info 14   [15:29:54.281] Starting C:\Program Files\Microsoft VS Code\Code.exe with args ["c:\\Program Files\\Microsoft VS Code\\resources\\app\\extensions\\node_modules\\typescript\\lib/watchGuard.js","c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/custom-typings"]
Info 15   [15:29:54.415] WatchGuard for path c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/custom-typings returned: OK
Info 16   [15:29:54.416] Add recursive watcher for: c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan
Info 17   [15:29:54.416] watchDirectory for c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan uses cached drive information.
Info 18   [15:29:54.416] Add recursive watcher for: c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/spec
Info 19   [15:29:54.416] watchDirectory for c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/spec uses cached drive information.
Info 20   [15:29:54.417] Add type root watcher for: c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@types
Info 21   [15:29:54.417] watchDirectory for c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@types uses cached drive information.
Info 22   [15:29:54.420] event: {"seq":0,"type":"event","event":"telemetry","body":{"telemetryEventName":"projectInfo","payload":{"projectId":"46a465e73129150aa0b063bbcdd4eccb","fileStats":{"js":1168,"jsx":0,"ts":13,"tsx":0,"dts":11},"compilerOptions":{"emitDecoratorMetadata":true,"experimentalDecorators":true,"inlineSources":true,"lib":["dom","es6","es2015.reflect"],"module":"commonjs","moduleResolution":"node","newLine":"lf","noImplicitAny":false,"removeComments":true,"sourceMap":true,"noUnusedLocals":true,"noUnusedParameters":true,"strictNullChecks":true,"target":"es5","allowJs":true,"outDir":""},"typeAcquisition":{"enable":false,"include":false,"exclude":false},"extends":true,"files":false,"include":true,"exclude":true,"compileOnSave":false,"configFileName":"tsconfig.json","projectType":"configured","languageServiceEnabled":false,"version":"2.5.2"}}}
Info 23   [15:29:54.420] Opened configuration file c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/tsconfig.json
Info 24   [15:29:54.441] Project 'c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/tsconfig.json' (Configured) 0
Info 24   [15:29:54.441] 	c:/Program Files/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/lib.es2015.d.ts
	c:/Program Files/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/lib.es5.d.ts
	c:/Program Files/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts
	c:/Program Files/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/lib.es2015.reflect.d.ts
	c:/Program Files/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/lib.es2015.proxy.d.ts
	c:/Program Files/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/lib.es2015.iterable.d.ts
	c:/Program Files/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/lib.es2015.symbol.d.ts
	c:/Program Files/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/lib.es2015.promise.d.ts
	c:/Program Files/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/lib.es2015.generator.d.ts
	c:/Program Files/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/lib.es2015.collection.d.ts
	c:/Program Files/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/lib.es2015.core.d.ts
	c:/Program Files/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/lib.dom.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@pan/extjs3/ext-3.2.0.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@pan/json/dist-es5/get.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@pan/json/dist-es5/filter.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@pan/json/dist-es5/jsonPath.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@pan/json/dist-es5/index.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@pan/environment/dist-es5/interfaces.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@pan/environment/dist-es5/namespace.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@pan/environment/dist-es5/ServerProperty.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@pan/environment/dist-es5/index.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/aurelia-pal/dist/aurelia-pal.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/aurelia-polyfills/dist/aurelia-polyfills.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/aurelia-logging/dist/aurelia-logging.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/aurelia-logging-memory/dist/es5/index.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/aurelia-logging-color/dist/es5/interfaces.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/aurelia-logging-color/dist/es5/ColorAppender.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/aurelia-logging-color/dist/es5/index.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@pan/logging/dist-es5/interfaces.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@pan/logging/dist-es5/configIDValidation.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@pan/logging/dist-es5/getLogger.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@pan/logging/dist-es5/getLoggers.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@pan/logging/dist-es5/logSourceLocation.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@pan/logging/dist-es5/setLevels.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@pan/logging/dist-es5/index.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/reflect-metadata/index.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@pan/module-injection/dist-es5/Newable.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/aurelia-dependency-injection/dist/aurelia-dependency-injection.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@pan/module-injection/dist-es5/DependencyInjection.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@pan/module-injection/dist-es5/PandaContainer.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@pan/module-injection/dist-es5/configurator.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@pan/module-injection/dist-es5/index.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@panos/panos/dist-es5/direct.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@panos/panos/dist-es5/index.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/custom-typings/panos-panos.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan/common/columns.js
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@types/deep-extend/index.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@types/file-url/index.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@types/jest/index.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@types/jquery/index.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@types/node/index.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@types/jsdom/index.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@types/lodash/index.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@types/mkdirp/index.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@types/sinon/index.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@types/systemjs/index.d.ts
	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@types/xml2json/index.d.ts

Info 24   [15:29:54.442] -----------------------------------------------
Info 24   [15:29:54.442] Open files: 
Info 24   [15:29:54.442] 	c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan/common/columns.js
Info 24   [15:29:54.442] event: {"seq":0,"type":"event","event":"configFileDiag","body":{"triggerFile":"c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan/common/columns.js","configFile":"c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/tsconfig.json","diagnostics":[]}}
Perf 25   [15:29:54.442] 2::open: async elapsed time (in milliseconds) 2821.3754
Info 26   [15:29:54.542] request: {"seq":3,"type":"request","command":"getSupportedCodeFixes","arguments":null}
Perf 27   [15:29:54.542] 3::getSupportedCodeFixes: elapsed time (in milliseconds) 0.5269
Info 28   [15:29:54.542] response: {"seq":0,"type":"response","command":"getSupportedCodeFixes","request_seq":3,"success":true,"body":["1002","1003","1005","1006","1009","1010","1012","1014","1015","1016","1017","1018","1019","1020","1021","1022","1023","1024","1028","1029","1030","1031","1034","1035","1036","1038","1039","1040","1041","1042","1043","1044","1045","1046","1047","1048","1049","1051","1052","1053","1054","1055","1056","1057","1058","1059","1060","1061","1062","1063","1064","1066","1068","1070","1071","1079","1084","1085","1086","1089","1090","1091","1092","1093","1094","1095","1096","1097","1098","1099","1100","1101","1102","1103","1104","1105","1107","1108","1109","1110","1113","1114","1115","1116","1117","1118","1119","1120","1121","1122","1123","1124","1125","1126","1127","1128","1129","1130","1131","1132","1134","1135","1136","1137","1138","1139","1140","1141","1142","1144","1146","1147","1148","1149","1150","1155","1156","1157","1160","1161","1162","1163","1164","1165","1166","1168","1169","1170","1171","1172","1173","1174","1175","1176","1177","1178","1179","1180","1181","1182","1183","1184","1185","1186","1187","1188","1189","1190","1191","1192","1193","1194","1196","1197","1198","1199","1200","1202","1203","1205","1206","1207","1208","1209","1210","1211","1212","1213","1214","1215","1216","1218","1219","1220","1221","1222","1223","1224","1225","1226","1227","1228","1229","1230","1231","1232","1233","1234","1235","1236","1237","1238","1239","1240","1241","1242","1243","1244","1245","1246","1247","1248","1249","1250","1251","1252","1253","1254","1300","1308","1312","1313","1314","1315","1316","1317","1318","1319","1320","1321","1322","1323","1324","1325","1326","1327","1328","2300","2301","2302","2303","2304","2305","2306","2307","2308","2309","2310","2311","2312","2313","2314","2315","2316","2317","2318","2319","2320","2321","2322","2323","2324","2325","2326","2327","2328","2329","2330","2331","2332","2333","2334","2335","2336","2337","2338","2339","2340","2341","2342","2343","2344","2345","2346","2347","2348","2349","2350","2351","2352","2353","2354","2355","2356","2357","2358","2359","2360","2361","2362","2363","2364","2365","2366","2368","2369","2370","2371","2372","2373","2374","2375","2376","2377","2378","2379","2380","2381","2382","2383","2384","2385","2386","2387","2388","2389","2390","2391","2392","2393","2394","2395","2396","2397","2399","2400","2401","2402","2403","2404","2405","2406","2407","2408","2409","2410","2411","2412","2413","2414","2415","2417","2420","2422","2423","2424","2425","2426","2427","2428","2430","2431","2432","2433","2434","2435","2436","2437","2438","2439","2440","2441","2442","2443","2444","2445","2446","2447","2448","2449","2450","2451","2452","2453","2454","2455","2456","2457","2458","2459","2460","2461","2462","2463","2464","2465","2466","2467","2468","2469","2470","2471","2472","2473","2474","2475","2476","2477","2478","2479","2480","2481","2483","2484","2487","2488","2489","2490","2491","2492","2493","2494","2495","2496","2497","2498","2499","2500","2501","2502","2503","2504","2505","2506","2507","2508","2509","2510","2511","2512","2513","2514","2515","2516","2517","2518","2519","2520","2521","2522","2523","2524","2525","2526","2527","2528","2529","2530","2531","2532","2533","2534","2535","2536","2537","2538","2539","2540","2541","2542","2543","2544","2545","2546","2547","2548","2549","2550","2551","2552","2553","2554","2555","2556","2557","2558","2559","2560","2600","2601","2602","2603","2604","2605","2606","2607","2608","2609","2649","2651","2652","2653","2654","2656","2657","2658","2659","2660","2661","2662","2663","2664","2665","2666","2667","2668","2669","2670","2671","2672","2673","2674","2675","2676","2677","2678","2679","2680","2681","2682","2683","2684","2685","2686","2687","2688","2689","2691","2692","2693","2694","2695","2696","2697","2698","2699","2700","2701","2702","2703","2704","2705","2706","2707","2708","2709","2710","2711","2712","2713","4000","4002","4004","4006","4008","4010","4012","4014","4016","4019","4020","4022","4023","4024","4025","4026","4027","4028","4029","4030","4031","4032","4033","4034","4035","4036","4037","4038","4039","4040","4041","4042","4043","4044","4045","4046","4047","4048","4049","4050","4051","4052","4053","4054","4055","4056","4057","4058","4059","4060","4061","4062","4063","4064","4065","4066","4067","4068","4069","4070","4071","4072","4073","4074","4075","4076","4077","4078","4081","4082","4083","4091","4092","4094","5001","5009","5010","5011","5012","5014","5023","5024","5033","5042","5047","5051","5052","5053","5054","5055","5056","5057","5058","5059","5060","5061","5062","5063","5064","5065","5066","5067","6044","6045","6046","6048","6049","6050","6051","6053","6054","6059","6064","6082","6103","6114","6129","6131","6133","6137","6138","6140","6142","6143","7005","7006","7008","7009","7010","7011","7013","7015","7016","7017","7018","7019","7020","7022","7023","7024","7025","7026","7027","7028","7029","7030","7031","7032","7033","7034","7035","7036","8000","8001","8002","8003","8004","8005","8006","8007","8008","8009","8010","8011","8012","8013","8015","8016","8017","8018","8020","9002","9003","9004","17000","17001","17002","17003","17004","17005","17006","17007","17008","17009","17010","17011","17012","17013","18000","18001","18002","18003","90009","90010"]}
Info 29   [15:29:54.543] request: {"seq":4,"type":"request","command":"getApplicableRefactors","arguments":{"file":"c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan/common/columns.js","startLine":8,"startOffset":15,"endLine":8,"endOffset":15}}
Perf 30   [15:29:54.552] 4::getApplicableRefactors: elapsed time (in milliseconds) 8.8371
Info 31   [15:29:54.552] response: {"seq":0,"type":"response","command":"getApplicableRefactors","request_seq":4,"success":true,"body":[]}
Info 32   [15:29:54.553] request: {"seq":5,"type":"request","command":"navtree","arguments":{"file":"c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan/common/columns.js"}}
Perf 33   [15:29:54.557] 5::navtree: elapsed time (in milliseconds) 4.0879
Info 34   [15:29:54.557] response: {"seq":0,"type":"response","command":"navtree","request_seq":5,"success":true,"body":{"text":"<global>","kind":"script","kindModifiers":"","spans":[{"start":{"line":1,"offset":1},"end":{"line":12,"offset":7}}],"childItems":[{"text":"<function>","kind":"function","kindModifiers":"","spans":[{"start":{"line":2,"offset":2},"end":{"line":12,"offset":2}}],"childItems":[{"text":"copy","kind":"method","kindModifiers":"","spans":[{"start":{"line":5,"offset":9},"end":{"line":9,"offset":10}}]}]}]}}
Info 35   [15:29:54.557] request: {"seq":6,"type":"request","command":"getApplicableRefactors","arguments":{"file":"c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan/common/columns.js","startLine":8,"startOffset":15,"endLine":8,"endOffset":15}}
Perf 36   [15:29:54.558] 6::getApplicableRefactors: elapsed time (in milliseconds) 0.7070
Info 37   [15:29:54.558] response: {"seq":0,"type":"response","command":"getApplicableRefactors","request_seq":6,"success":true,"body":[]}
Info 38   [15:29:54.558] request: {"seq":7,"type":"request","command":"getApplicableRefactors","arguments":{"file":"c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan/common/columns.js","startLine":8,"startOffset":15,"endLine":8,"endOffset":15}}
Perf 39   [15:29:54.559] 7::getApplicableRefactors: elapsed time (in milliseconds) 0.7049
Info 40   [15:29:54.559] response: {"seq":0,"type":"response","command":"getApplicableRefactors","request_seq":7,"success":true,"body":[]}
Info 41   [15:32:34.899] request: {"seq":8,"type":"request","command":"quickinfo","arguments":{"file":"c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan/common/columns.js","line":3,"offset":15}}
Perf 42   [15:32:34.900] 8::quickinfo: elapsed time (in milliseconds) 1.7323
Info 43   [15:32:34.900] response: {"seq":0,"type":"response","command":"quickinfo","request_seq":8,"success":false,"message":"No content available."}
Info 44   [15:32:40.189] request: {"seq":9,"type":"request","command":"occurrences","arguments":{"file":"c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan/common/columns.js","line":2,"offset":10}}
Perf 45   [15:32:40.191] 9::occurrences: elapsed time (in milliseconds) 2.1154
Info 46   [15:32:40.191] response: {"seq":0,"type":"response","command":"occurrences","request_seq":9,"success":false,"message":"No content available."}
Info 47   [15:32:40.749] request: {"seq":10,"type":"request","command":"definition","arguments":{"file":"c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan/common/columns.js","line":2,"offset":10}}
Perf 48   [15:32:40.751] 10::definition: elapsed time (in milliseconds) 2.0489
Info 49   [15:32:40.751] response: {"seq":0,"type":"response","command":"definition","request_seq":10,"success":false,"message":"No content available."}
Info 50   [15:33:34.929] request: {"seq":11,"type":"request","command":"getApplicableRefactors","arguments":{"file":"c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan/common/columns.js","startLine":1,"startOffset":1,"endLine":1,"endOffset":1}}
Perf 51   [15:33:34.930] 11::getApplicableRefactors: elapsed time (in milliseconds) 1.0598
Info 52   [15:33:34.930] response: {"seq":0,"type":"response","command":"getApplicableRefactors","request_seq":11,"success":true,"body":[]}
Info 53   [15:33:35.143] request: {"seq":12,"type":"request","command":"navtree","arguments":{"file":"c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan/common/columns.js"}}
Perf 54   [15:33:35.144] 12::navtree: elapsed time (in milliseconds) 0.7693
Info 55   [15:33:35.144] response: {"seq":0,"type":"response","command":"navtree","request_seq":12,"success":true,"body":{"text":"<global>","kind":"script","kindModifiers":"","spans":[{"start":{"line":1,"offset":1},"end":{"line":12,"offset":7}}],"childItems":[{"text":"<function>","kind":"function","kindModifiers":"","spans":[{"start":{"line":2,"offset":2},"end":{"line":12,"offset":2}}],"childItems":[{"text":"copy","kind":"method","kindModifiers":"","spans":[{"start":{"line":5,"offset":9},"end":{"line":9,"offset":10}}]}]}]}}

Copied from original issue: microsoft/vscode#35549

@mjbvz mjbvz self-assigned this Oct 19, 2017
@mjbvz
Copy link
Contributor Author

mjbvz commented Oct 19, 2017

From @unional on October 11, 2017 23:25

Info 524  [16:18:3.299] remove project: c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan/network/gp/GlobalProtectPortalsViewer.js
Info 525  [16:18:3.300] Close directory watcher for: c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan/network/gp
Info 526  [16:18:3.300] Close directory watcher for: c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan/network
Info 527  [16:18:3.300] Close directory watcher for: c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan
Info 528  [16:18:3.301] Close directory watcher for: c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js
Info 529  [16:18:3.301] Close directory watcher for: c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs
Info 530  [16:18:3.301] Close directory watcher for: c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui
Info 531  [16:18:3.301] Close directory watcher for: c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt
Info 532  [16:18:3.301] Close directory watcher for: c:/Users/hwong/p4/feature/fs4-kiev/src
Info 533  [16:18:3.301] Close directory watcher for: c:/Users/hwong/p4/feature/fs4-kiev
Info 534  [16:18:3.301] Close directory watcher for: c:/Users/hwong/p4/feature
Info 535  [16:18:3.301] Close directory watcher for: c:/Users/hwong/p4
Info 536  [16:18:3.301] Close directory watcher for: c:/Users/hwong
Info 537  [16:18:3.301] Close directory watcher for: c:/Users
Info 538  [16:18:3.302] Project 'c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/tsconfig.json' (Configured) 0

Today I notice this. The folder js/pan/network is in the exclude list when I open it.
Is it possible that when the engine traced to an excluded file and all the directory watchers in the folder chain are closed, thus causing the issue?

EDIT: This is probably something different.

@mjbvz
Copy link
Contributor Author

mjbvz commented Oct 19, 2017

From @unional on October 12, 2017 2:28

Info 12   [15:29:54.281] Add recursive watcher for: c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/custom-typings
Info 13   [15:29:54.281] c for path c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/custom-typings not found in cache...
Info 14   [15:29:54.281] Starting C:\Program Files\Microsoft VS Code\Code.exe with args ["c:\\Program Files\\Microsoft VS Code\\resources\\app\\extensions\\node_modules\\typescript\\lib/watchGuard.js","c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/custom-typings"]
Info 15   [15:29:54.415] WatchGuard for path c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/custom-typings returned: OK
Info 16   [15:29:54.416] Add recursive watcher for: c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan
Info 17   [15:29:54.416] watchDirectory for c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan uses cached drive information.
Info 18   [15:29:54.416] Add recursive watcher for: c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/spec
Info 19   [15:29:54.416] watchDirectory for c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/spec uses cached drive information.
Info 20   [15:29:54.417] Add type root watcher for: c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@types
Info 21   [15:29:54.417] watchDirectory for c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/node_modules/@types uses cached drive information.

Noticed this:

Info 12   [15:29:54.281] Add recursive watcher for: c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/custom-typings
Info 13   [19:21:34.595] c for path c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/custom-typings not found in cache...
Info 14   [19:21:34.595] Starting C:\Program Files\Microsoft VS Code\Code.exe with args ["c:\\Program Files\\Microsoft VS Code\\resources\\app\\extensions\\node_modules\\typescript\\lib/watchGuard.js","c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/custom-typings"]
Info 15   [15:29:54.415] WatchGuard for path c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/custom-typings returned: OK

While the large folder:

Info 16   [15:29:54.416] Add recursive watcher for: c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan
Info 17   [19:21:34.733] watchDirectory for c:/Users/hwong/p4/feature/fs4-kiev/src/mgmt/ui/htdocs/js/pan uses cached drive information.

uses cached drive info.

Is there a way to clear the cache to test again?

Is it possible that the cache is corrupted?

@mjbvz
Copy link
Contributor Author

mjbvz commented Oct 19, 2017

From @unional on October 13, 2017 23:21

I try to build and run vscode from source code.
I try to debug into this:
https://github.com/Microsoft/vscode/blob/5ebdf7319751a864157a1fc932cd21c4782e8e30/extensions/typescript/src/utils/projectStatus.ts#L47-L51

But I can't find it in the developer tools when the warning appears.

How do I debug into the TypeScript extension?

@mjbvz
Copy link
Contributor Author

mjbvz commented Oct 19, 2017

From @unional on October 14, 2017 4:4

I dig in and discovered I have one large file that push the totalNonTsFileSize over the server.maxProgramSizeForNonTsFile here

https://github.com/Microsoft/TypeScript/blob/29ed92e20d31d637e92584216d55fb16cb80231e/src/server/editorServices.ts#L1368-L1372

That file is a 9MB JS file.
Excluding that get rid of the problem.

However, server.maxProgramSizeForNonTsFile is set to 20 * 1024 * 1024 which is pretty small (20 MB):

https://github.com/Microsoft/TypeScript/blob/29ed92e20d31d637e92584216d55fb16cb80231e/src/server/editorServices.ts#L10

Also, that value is not configurable.
What is the reason for that hardcoded cap?
Should it be configurable?

On the other hand, it would be a good idea to fire an event mentioning which file(s) causing the language service to become disabled.

@mjbvz
Copy link
Contributor Author

mjbvz commented Oct 19, 2017

From @unional on October 19, 2017 0:2

Also, I notice the file sizes are counted twice.

I added a line here: https://github.com/Microsoft/TypeScript/blob/29ed92e20d31d637e92584216d55fb16cb80231e/src/server/editorServices.ts#L1374

to print out the server.maxProgramSizeForNonTsFile, availableSpace, and totalNonTsFileSize. I got two logs:

Info 12   [16:57:20.882] max (20971520), avail (20971520), total (13548710)
...
Info 40   [16:59:36.825] max (20971520), avail (7422810), total (13548710)

You can see the avail is decreased by the values in projectToSizeMap precisely 13548710. The previous value.

I have already removed all large items and now I don't have anything more to exclude.

Help! 😞

@mjbvz mjbvz added VS Code Tracked There is a VS Code equivalent to this issue and removed typescript labels Oct 19, 2017
@RyanCavanaugh
Copy link
Member

What is the reason for that hardcoded cap? Should it be configurable?

This is an experimentally-derived value - at 20 MB of raw JS, we run out of address space in 32-bit nodejs and crash. In ts server, 64-bit node uses approximately twice as much memory for the same work, so this is where we'd be using about 3 GB of memory in 64-bit node and things would really not be responsive anyway.

We don't have any good ideas right now for how to support that much JS at once. Having the user do some sort of configuration to reduce the scope of analysis is the only available fix in this situation.

@unional
Copy link
Contributor

unional commented Oct 19, 2017

How about the double dip? It seems like if the double dip can be avoided, then it can support close to 2k files with the same 20MB

@d-akara
Copy link

d-akara commented Nov 1, 2017

@mjbvz
I'm attempting to make an assessment for a project that is about 100M+ of JS source.
Approximately 10k files, 2+ million lines of JS.

This is a legacy JS and I'm trying to determine if we can migrate to using VSCode and TypeScript.
The smallest component is about 30M or 2k of JS files.

In the smaller component I've got intellisense to partially work, but with some issues.
So I still need to better understand what exactly is supported. It seems each file I open VSCode loads all of its dependencies. Is the intellisense limit based on a single files dependencies? Or, is each file I open in VSCode using up capacity? Are resources released when I close a file?

Is this limitation a language service limitation only? Would TypeScript compiler be able to handle a project of this size even if intellisense is not fully functional?

@unional
Copy link
Contributor

unional commented Nov 1, 2017

For me, I manually edit that value to 40MB. It is working fine so far.

@d-akara
Copy link

d-akara commented Nov 1, 2017

That might be helpful, but I'm trying to get some insights because I can't just simply try it.

This legacy JS project has its own custom built module loading that TypeScript can't understand.
So there is going to be a rather large effort to do some migration and I need to understand if it is going to be worth it and if TypeScript can support a project this size before I continue down this path.

@mhegazy
Copy link
Contributor

mhegazy commented Nov 1, 2017

This is a legacy JS and I'm trying to determine if we can migrate to using VSCode and TypeScript.
The smallest component is about 30M or 2k of JS files.

Would love to get access to the source to see if there is something we can optimize here.

In the smaller component I've got intellisense to partially work, but with some issues.
So I still need to better understand what exactly is supported.

It seems each file I open VSCode loads all of its dependencies. Is the intellisense limit based on a single files dependencies?

yes. unless you have a jsconfig.json (or tsconfig.json) to specify what the project shape is. The dependents are figured out by walking the imports/require statements in your file, and building a trasitive clusre of that.

Or, is each file I open in VSCode using up capacity? Are resources released when I close a file?

We have limits on big files, files bigger than 5 MBs, we have found these to be usually minified libraries and not user code.
If your open file is one of these, or it imports one of these, then it will trigger the limit check.

We also have a total limit on whole program size to avoid crashing the server. this number is rather based on huristics and we can optimize it.. but i would need to have a project sample to be able to see what can be done..

our expiernece here is that if you have a tsconfig.json or jsconfig.json all files under this directory will be included, and we have found users who run into this limit usually have some directoriesd that either include dependenices or generated files, and does not happen for user code.
@unional added a check to include the top 5 files that causes the server to exceed its limit of files, and that should be in typescript@next today, so looking at the log might give you additional information.

Is this limitation a language service limitation only?

The language service needs to parse the files, and keep them in memory to be able to provide any information. memory is finite, and can be exhausted.

As noted, we have found that with the appropriate setup the LS scales relatively well. We would love to look at your project and see if there are additional changes that we need to make.

Would TypeScript compiler be able to handle a project of this size even if intellisense is not fully functional?

The LS and the compiler use the same engine. We have projects of similar and bigger sizes, so the size does not seem too big. i would want to ensure we have the correct configuration and project organization though.

@d-akara
Copy link

d-akara commented Nov 1, 2017

Would love to get access to the source to see if there is something we can optimize here.

It is an internal project. Probably wouldn't be helpful in the current state. It uses its own proprietary modules loading which doesn't conform to any of the popular module loaders.

I'm attempting to do some programmatic refactoring to commonJS format, but there is a lot of work to be done. I've only partially done this as an attempt to assess if this is going to work.

and we have found users who run into this limit usually have some directoriesd that either include dependenices or generated files

The size of the project I originally listed is with no dependencies.

The LS and the compiler use the same engine

So I'm a long way from converting this project to actual TS. However, that is a long term potential outcome. However, based on this statement, if intellisense is breaking, then I'm to assume if I were to be able to actually convert this project to TS that the compiler also would have issues compiling it?

i would want to ensure we have the correct configuration and project organization though.

Since this is a massive legacy JS application, there isn't much I can do about the organization. The smallest unit of separation I have been able to manage so far would be about 2000+ JS modules that need to be seen as one project.

What would be mostly helpful to me at this point is to better understand what is breaking now. I can't tell by the current logging which JS files are not being processed or how many of the 2000 files are being loaded/supported. Maybe the new additions to logging will be helpful.

@mhegazy
Copy link
Contributor

mhegazy commented Nov 1, 2017

It is an internal project.

we would be happy to sign any required NDAs.

Probably wouldn't be helpful in the current state.

it will help us understand why your inteliisense is not working.

It uses its own proprietary modules loading which doesn't conform to any of the popular module loaders.

This suggests it is a configuration issue with your project, since the project does not have many dependencies that the engine understands already.

The size of the project I originally listed is with no dependencies.

The size is not that out of the ordinary, we have other internal and external projects that are similar or bigger in size.

So I'm a long way from converting this project to actual TS.

Converting or not is not the issue here. we should support .js projects regardless..

if intellisense is breaking, then I'm to assume if I were to be able to actually convert this project to TS that the compiler also would have issues compiling it?

I do not know why your intellisense is breaking.. so i would not make this assumption.

What would be mostly helpful to me at this point is to better understand what is breaking now.

you can start by looking at the tsserver log file. sharing that would help.. feel free to send it to me by email.

@d-akara
Copy link

d-akara commented Nov 2, 2017

we would be happy to sign any required NDAs

Will look into what can be shared.

How do I use typescript@next to get the latest logging? Is this in VSCode Insiders?

@mhegazy
Copy link
Contributor

mhegazy commented Nov 2, 2017

VSCode ships with an older version of TypeScript. Please see Using Newer TypeScript Versions documentation for more details on updating your VSCode to use a different version of TypeScript.

@mhegazy mhegazy added the Needs More Info The issue still hasn't been fully clarified label Nov 2, 2017
@d-akara
Copy link

d-akara commented Nov 2, 2017

I was able to get the new logging. However, no files are listed with this log entry
Info 28 [15:50:18.90] Non TS file size exceeded limit (21014244). Largest files:

After this is a list of all of the file watchers. There are 2061 JS files listed there. 2061 is the correct number of JS files for this part of the project.

FYI, executing this du -ch projectDir *.js | tail -n1 says there is 28M of JS which seems why it is triggering the (21014244) limit.

ls -lR | grep '^-' | sort -k 5 -n tells me the largest file is 384k.

@unional
Copy link
Contributor

unional commented Nov 2, 2017

Probably something broken during refactoring. I'll take a look into it.

@mjbvz
Copy link
Contributor Author

mjbvz commented Jul 3, 2018

Closing this issue as we do not have enough information to investigate. Please try using the latest typescript@next to see if the problem has been fixed

@mjbvz mjbvz closed this as completed Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs More Info The issue still hasn't been fully clarified VS Code Tracked There is a VS Code equivalent to this issue
Projects
None yet
Development

No branches or pull requests

5 participants