-
Notifications
You must be signed in to change notification settings - Fork 77
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
Experimenting with some low hanging fruit in the code that parses and imports modules for the sake of DSL loading time in VScode #1863
Conversation
@DavyLandman this should fix some of the weird module import times we've seen. I don't know if it will come into the acceptible range of VScode extension boot time, but it's worth a try since this just makes everything faster without introducing more API. |
I'll try to make a benchmark ready that I can run for these changes, right now it's quite involved to get everything in the right places. |
I've created a small benchmark where we only trigger a long import chain of modules that have concrete syntax in them.
so yeah, this helps. the bench was the wall-clock-time reported for:
so it loads imports the module, and runs the main (which just prints: done loading) and then exits. |
@@ -369,6 +372,21 @@ public static IList getListASTArgs(ITree tree) { | |||
} | |||
return writer.done(); | |||
} | |||
|
|||
public static Stream<ITree> streamListASTArgs(ITree tree) { |
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 don't see calls to these functions?
Codecov Report
@@ Coverage Diff @@
## main #1863 +/- ##
=======================================
Coverage 49% 49%
- Complexity 6137 6151 +14
=======================================
Files 660 660
Lines 58634 58659 +25
Branches 8537 8541 +4
=======================================
+ Hits 28874 28899 +25
- Misses 27566 27573 +7
+ Partials 2194 2187 -7
|
Thanks @DavyLandman ! This is not near the effect we need so I'll stare some more |
new benchmark:
so strangly, not faster than the earlier commit. I did see it stopped loading the parser generator, so why it's not faster? |
… class reloading. Does not help much
I think all these changes make sense, they made it faster, and reduced the final case that would trigger the parser generator. |
This draft PR addresses the profile send by @DavyLandman on the overhead of importing modules. There are
some low hanging apples and oranges in the direction of skipping layout nodes and not allocating
intermediate tree representations the size of the entire AST.