-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
A-macromacro expansionmacro expansionC-featureCategory: feature requestCategory: feature requestE-hardS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now
Description
Investigation in #8623 showed that switching the crate graph is slow, and procedural macro loading is a significant contributor. In particular,
is called on the main loop for each proc macro, and it's slow, because it reads proc-macro file to get a version, and then waits for the proc-macro server process to dlopen the file and report back.
We should move all this work off the main loop.
Plan:
- split proc-macros out of crate graph and into a separate salsa query. This is useful in general for "reload proc macros" functionality.
- make
to_crate_graph
return a crate graph and proc macros separately - switch to the new salsa representation, while keeping the current synchronous loading
- (the tricky bit) add the main_loop Task to handle loading of proc macros asynchronously
Metadata
Metadata
Assignees
Labels
A-macromacro expansionmacro expansionC-featureCategory: feature requestCategory: feature requestE-hardS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now