-
Notifications
You must be signed in to change notification settings - Fork 12.8k
NavTo seems slower #38491
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
I'm seeing 10 seconds of other project loads:
Note the updateGraphDurationMs:
|
The behavior I'm seeing looks by design, if suboptimal. @mjbvz Is the UI flexible enough to do an initial search of the current project and then replace with solution-wide results when they become available? We'd need some sort of progress bar so users didn't treat the initial result as exhaustive. Edit: I guess it's actually the protocol that's inflexible - there's no way to convey "more results to follow". |
Broadly speaking this is the intended behavior in VS Code; you can toggle solution-wide searching with the setting The log fragment posted seems bad and should be investigated |
@RyanCavanaugh Assuming you mean Wes' fragment, I agree, but I didn't see anything like that in my local repros. @weswigham does it still repro for you? |
Yes VS Code now searches all open projects by default (on TS 3.9+). My understand is that this should only search the already opened project and not trigger a new project loads. You can disable this behavior with I made this the default because I felt searching all projects made the most sense for the way we describe go to symbol in workspace. It is useful in the VS Code codebase for example because we usually want search results from both our extensions and our core codebase. @amcasey VS Code cannot stream in results. We have to return them all in a single response |
@mjbvz Oops, it sounds like we might not all be on the same page. I'm pretty sure it was implemented as "search the world, loading things as needed", not "search the things that are open". |
Not sure if you still care, but yep, @amcasey - the latest nightly TS still has worse perf than 3.8.3. According to the log, a full 7 seconds between request issuance and response, compared with 800ms in 3.8.3. Current log: Info 634 [14:55:5.693] request: Info 661 [14:55:5.745] ----------------------------------------------- Info 678 [14:55:5.749] ----------------------------------------------- Info 704 [14:55:5.822] ----------------------------------------------- Info 729 [14:55:5.874] ----------------------------------------------- Info 756 [14:55:7.973] ----------------------------------------------- Info 781 [14:55:8.456] ----------------------------------------------- Info 806 [14:55:9.987] ----------------------------------------------- Info 831 [14:55:10.60] ----------------------------------------------- Info 856 [14:55:10.134] ----------------------------------------------- Info 882 [14:55:10.213] ----------------------------------------------- Info 907 [14:55:10.275] ----------------------------------------------- Info 924 [14:55:10.590] ----------------------------------------------- Info 941 [14:55:10.659] ----------------------------------------------- Info 958 [14:55:10.993] ----------------------------------------------- 3.8.3 log:
Info 683 [15:2:44.847] request:
{"seq":16,"type":"request","command":"navto","arguments":{"file":"d:/Github/TypeScript/src/compiler/checker.ts","searchValue":"isRelatedTo","maxResultCount":256}}
Info 684 [15:2:44.848] Search path: d:/Github/TypeScript/src/compiler
Info 685 [15:2:44.848] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 686 [15:2:45.164] Search path: d:/Github/TypeScript/src/compiler
Info 687 [15:2:45.164] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 688 [15:2:45.165] Search path: d:/Github/TypeScript/src/compiler
Info 689 [15:2:45.165] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 690 [15:2:45.165] Search path: d:/Github/TypeScript/src/compiler
Info 691 [15:2:45.165] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 692 [15:2:45.165] Search path: d:/Github/TypeScript/src/compiler
Info 693 [15:2:45.165] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 694 [15:2:45.460] Search path: d:/Github/TypeScript/src/compiler
Info 695 [15:2:45.460] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 696 [15:2:45.460] Search path: d:/Github/TypeScript/src/compiler
Info 697 [15:2:45.460] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 698 [15:2:45.460] Search path: d:/Github/TypeScript/src/compiler
Info 699 [15:2:45.460] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 700 [15:2:45.460] Search path: d:/Github/TypeScript/src/compiler
Info 701 [15:2:45.460] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 702 [15:2:45.581] Search path: d:/Github/TypeScript/src/compiler
Info 703 [15:2:45.581] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 704 [15:2:45.581] Search path: d:/Github/TypeScript/src/compiler
Info 705 [15:2:45.581] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 706 [15:2:45.581] Search path: d:/Github/TypeScript/src/compiler
Info 707 [15:2:45.581] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 708 [15:2:45.581] Search path: d:/Github/TypeScript/src/compiler
Info 709 [15:2:45.581] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 710 [15:2:45.662] Search path: d:/Github/TypeScript/src/compiler
Info 711 [15:2:45.662] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 712 [15:2:45.662] Search path: d:/Github/TypeScript/src/compiler
Info 713 [15:2:45.662] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 714 [15:2:45.662] Search path: d:/Github/TypeScript/src/compiler
Info 715 [15:2:45.662] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 716 [15:2:45.662] Search path: d:/Github/TypeScript/src/compiler
Info 717 [15:2:45.662] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 718 [15:2:45.663] Search path: d:/Github/TypeScript/src/compiler
Info 719 [15:2:45.663] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 720 [15:2:45.663] Search path: d:/Github/TypeScript/src/compiler
Info 721 [15:2:45.663] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 722 [15:2:45.663] Search path: d:/Github/TypeScript/src/compiler
Info 723 [15:2:45.663] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 724 [15:2:45.663] Search path: d:/Github/TypeScript/src/compiler
Info 725 [15:2:45.663] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 726 [15:2:45.663] Search path: d:/Github/TypeScript/src/compiler
Info 727 [15:2:45.663] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 728 [15:2:45.663] Search path: d:/Github/TypeScript/src/compiler
Info 729 [15:2:45.663] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 730 [15:2:45.663] Search path: d:/Github/TypeScript/src/compiler
Info 731 [15:2:45.663] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 732 [15:2:45.663] Search path: d:/Github/TypeScript/src/compiler
Info 733 [15:2:45.663] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 734 [15:2:45.663] Search path: d:/Github/TypeScript/src/compiler
Info 735 [15:2:45.663] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 736 [15:2:45.663] Search path: d:/Github/TypeScript/src/compiler
Info 737 [15:2:45.663] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 738 [15:2:45.663] Search path: d:/Github/TypeScript/src/compiler
Info 739 [15:2:45.663] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 740 [15:2:45.664] Search path: d:/Github/TypeScript/src/compiler
Info 741 [15:2:45.664] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 742 [15:2:45.664] Search path: d:/Github/TypeScript/src/compiler
Info 743 [15:2:45.664] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 744 [15:2:45.664] Search path: d:/Github/TypeScript/src/compiler
Info 745 [15:2:45.664] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 746 [15:2:45.664] Search path: d:/Github/TypeScript/src/compiler
Info 747 [15:2:45.664] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Info 748 [15:2:45.664] Search path: d:/Github/TypeScript/src/compiler
Info 749 [15:2:45.664] For info: d:/Github/TypeScript/src/compiler/checker.ts :: Config file name: d:/Github/TypeScript/src/compiler/tsconfig.json
Perf 750 [15:2:45.664] 16::navto: elapsed time (in milliseconds) 816.4674
Info 751 [15:2:45.664] response:
{"seq":0,"type":"response","command":"navto","request_seq":16,"success":true,"body":[{"name":"isRelatedTo","kind":"function","isCaseSensitive":true,"matchKind":"exact","file":"d:/Github/TypeScript/src/compiler/checker.ts","start":{"line":16219,"offset":13},"end":{"line":16437,"offset":14},"containerName":"checkTypeRelatedTo","containerKind":"function"},{"name":"isEnumTypeRelatedTo","kind":"function","isCaseSensitive":true,"matchKind":"camelCase","file":"d:/Github/TypeScript/src/compiler/checker.ts","start":{"line":15775,"offset":9},"end":{"line":15807,"offset":10},"containerName":"createTypeChecker","containerKind":"function"},{"name":"isSimpleTypeRelatedTo","kind":"function","isCaseSensitive":true,"matchKind":"camelCase","file":"d:/Github/TypeScript/src/compiler/checker.ts","start":{"line":15809,"offset":9},"end":{"line":15844,"offset":10},"containerName":"createTypeChecker","containerKind":"function"},{"name":"isTypeRelatedTo","kind":"function","isCaseSensitive":true,"matchKind":"camelCase","file":"d:/Github/TypeScript/src/compiler/checker.ts","start":{"line":15846,"offset":9},"end":{"line":15875,"offset":10},"containerName":"createTypeChecker","containerKind":"function"},{"name":"isRelatedTo","kind":"function","isCaseSensitive":true,"matchKind":"exact","file":"d:/Github/TypeScript/src/compiler/checker.ts","start":{"line":16219,"offset":13},"end":{"line":16437,"offset":14},"containerName":"checkTypeRelatedTo","containerKind":"function"},{"name":"isEnumTypeRelatedTo","kind":"function","isCaseSensitive":true,"matchKind":"camelCase","file":"d:/Github/TypeScript/src/compiler/checker.ts","start":{"line":15775,"offset":9},"end":{"line":15807,"offset":10},"containerName":"createTypeChecker","containerKind":"function"},{"name":"isSimpleTypeRelatedTo","kind":"function","isCaseSensitive":true,"matchKind":"camelCase","file":"d:/Github/TypeScript/src/compiler/checker.ts","start":{"line":15809,"offset":9},"end":{"line":15844,"offset":10},"containerName":"createTypeChecker","containerKind":"function"},{"name":"isTypeRelatedTo","kind":"function","isCaseSensitive":true,"matchKind":"camelCase","file":"d:/Github/TypeScript/src/compiler/checker.ts","start":{"line":15846,"offset":9},"end":{"line":15875,"offset":10},"containerName":"createTypeChecker","containerKind":"function"},{"name":"isRelatedTo","kind":"function","isCaseSensitive":true,"matchKind":"exact","file":"d:/Github/TypeScript/src/compiler/checker.ts","start":{"line":16219,"offset":13},"end":{"line":16437,"offset":14},"containerName":"checkTypeRelatedTo","containerKind":"function"},{"name":"isEnumTypeRelatedTo","kind":"function","isCaseSensitive":true,"matchKind":"camelCase","file":"d:/Github/TypeScript/src/compiler/checker.ts","start":{"line":15775,"offset":9},"end":{"line":15807,"offset":10},"containerName":"createTypeChecker","containerKind":"function"},{"name":"isSimpleTypeRelatedTo","kind":"function","isCaseSensitive":true,"matchKind":"camelCase","file":"d:/Github/TypeScript/src/compiler/checker.ts","start":{"line":15809,"offset":9},"end":{"line":15844,"offset":10},"containerName":"createTypeChecker","containerKind":"function"},{"name":"isTypeRelatedTo","kind":"function","isCaseSensitive":true,"matchKind":"camelCase","file":"d:/Github/TypeScript/src/compiler/checker.ts","start":{"line":15846,"offset":9},"end":{"line":15875,"offset":10},"containerName":"createTypeChecker","containerKind":"function"},{"name":"isRelatedTo","kind":"function","isCaseSensitive":true,"matchKind":"exact","file":"d:/Github/TypeScript/src/compiler/checker.ts","start":{"line":16219,"offset":13},"end":{"line":16437,"offset":14},"containerName":"checkTypeRelatedTo","containerKind":"function"},{"name":"isEnumTypeRelatedTo","kind":"function","isCaseSensitive":true,"matchKind":"camelCase","file":"d:/Github/TypeScript/src/compiler/checker.ts","start":{"line":15775,"offset":9},"end":{"line":15807,"offset":10},"containerName":"createTypeChecker","containerKind":"function"},{"name":"isSimpleTypeRelatedTo","kind":"function","isCaseSensitive":true,"matchKind":"camelCase","file":"d:/Github/TypeScript/src/compiler/checker.ts","start":{"line":15809,"offset":9},"end":{"line":15844,"offset":10},"containerName":"createTypeChecker","containerKind":"function"},{"name":"isTypeRelatedTo","kind":"function","isCaseSensitive":true,"matchKind":"camelCase","file":"d:/Github/TypeScript/src/compiler/checker.ts","start":{"line":15846,"offset":9},"end":{"line":15875,"offset":10},"containerName":"createTypeChecker","containerKind":"function"},{"name":"isRelatedTo","kind":"function","isCaseSensitive":true,"matchKind":"exact","file":"d:/Github/TypeScript/src/compiler/checker.ts","start":{"line":16219,"offset":13},"end":{"line":16437,"offset":14},"containerName":"checkTypeRelatedTo","containerKind":"function"},{"name":"isEnumTypeRelatedTo","kind":"function","isCaseSensitive":true,"matchKind":"camelCase","file":"d:/Github/TypeScript/src/compiler/checker.ts","start":{"line":15775,"offset":9},"end":{"line":15807,"offset":10},"containerName":"createTypeChecker","containerKind":"function"},{"name":"isSimpleTypeRelatedTo","kind":"function","isCaseSensitive":true,"matchKind":"camelCase","file":"d:/Github/TypeScript/src/compiler/checker.ts","start":{"line":15809,"offset":9},"end":{"line":15844,"offset":10},"containerName":"createTypeChecker","containerKind":"function"},{"name":"isTypeRelatedTo","kind":"function","isCaseSensitive":true,"matchKind":"camelCase","file":"d:/Github/TypeScript/src/compiler/checker.ts","start":{"line":15846,"offset":9},"end":{"line":15875,"offset":10},"containerName":"createTypeChecker","containerKind":"function"}]}
All the project loading is clearly a lot of work :S |
It sounds like the server never actually provided the functionality VS Code wanted (only search open projects?). So maybe we just need a flag for that? I'm not sure we can take back the recently-added functionality, even though VS isn't using it and VS Code doesn't want to. |
@weswigham @amcasey Do you mean that TypeScript trying to open all projects it finds in your workspace? That does not match the behavior I've seen when using workspace symbol search in VS Code |
@mjbvz All projects in your "solution" of connected composite projects. |
Also cache the result of config file name for open files Fixes #38491
Also cache the result of config file name for open files Fixes #38491
We talked about this briefly after our design meeting last week, but editor
navTo
responses using the latest nightly seem much slower than on3.8.3
.Opening up
checker.ts
and searching for#isRelatedTo
in the editor yields a log fragment similar to:It's possible this is an (un)intended outcome of the multi-project symbol search released with 3.9.
The text was updated successfully, but these errors were encountered: