Conversation
11b7291 to
89a5d6d
Compare
89a5d6d to
0774892
Compare
…claration, just use a single switch statement.
src/services/navigationBar.ts
Outdated
| */ | ||
| interface NavNode { | ||
| node: Node; | ||
| additionalNodes: Node[]; // May be missing |
There was a problem hiding this comment.
If the comment is true, I'd remove the comment, and write additionalNodes?: Node[]; instead. (This would likely be caught if we could compile the compiler under strict null checks)
src/services/navigationBar.ts
Outdated
| function createNavNode(parent: NavNode, node: Node): NavNode { | ||
| const navNode: NavNode = { | ||
| node, | ||
| additionalNodes: undefined, |
There was a problem hiding this comment.
Now that this field is optional, you may just omit it from this initializer, unless there's a perf-related reason not to.
There was a problem hiding this comment.
probably will have better perf
There was a problem hiding this comment.
Probably will have better perf which way?
|
@Andy-MS, can we get some perf numbers of how the new code fairs? i would pick a couple of files for ts and js, small (tsc.ts/ some small js file) and large (checker.ts / typescriptServices.js), and get how long it took us to generate nav bar items, possibly through the tsserver request duration, before and after the change. i would also like see the memory consumption comparison. |
|
Closed in favor of #9220 |
Fixes #8779, #5258, #4191, and #8218.
Gets us closer to #7523 (combines TS and JS code paths for navigation bar).