-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Refactor navigation bar #9220
Refactor navigation bar #9220
Conversation
3a8972e
to
88d25c4
Compare
Here's a summary of performance tests:
Keep in mind that the refactor has been heavily optimized, and if the old version were similarly optimized it would probably be twice as fast. How tests were done:
checker.ts (large TS file):
tsc.ts (small TS file):
typeScriptServices.js (large JS file):
chalk.js (small JS file):
Here are some things that helped with performance:
Here are some things that still hurt us:
|
88d25c4
to
166bc49
Compare
@@ -17,19 +17,19 @@ namespace ts { | |||
} | |||
|
|||
function visitNode<T>(cbNode: (node: Node) => T, node: Node): T { | |||
if (node) { | |||
if (node !== void 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mentioned it in person, but how does this compare to an always undefined
(never passed) function argument? (IE, visitNode<T>(cbNode: (node: Node) => T, node: Node, missing?: undefined): T
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After running some more tests, the difference between implicit casts and void 0
appears to exist entirely within the imagination of the Chrome profiler. When running normally, it doesn't seem to make any difference.
👍 |
Fixes #8779, #5258, #4191, and #8218.
Gets us closer to #7523 (combines TS and JS code paths for navigation bar).
Takes over from #8958 and does not conflict with current master.