Uh oh!
There was an error while loading. Please reload this page.
Refactor navigation bar - #8958
Conversation
| */ | ||
| 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)
| 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?
Mohamed Hegazy (mhegazy)
commented
Jun 10, 2016
Andy (Andrewkraft) (@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. |
Fixes#8779, #5258, #4191, and #8218.
Gets us closer to #7523 (combines TS and JS code paths for navigation bar).