Improve performance of lsif generation.#51457
Conversation
|
Is there an easy way I can run the generator locally? |
|
I'm running: Note: you'll need #51458 where i add support for just running against a single project. i can also collect full solution time. |
|
Performance at the full solution goes from: Total time spent in the generation phase for all projects, including compilation fetch time: 523.66 seconds to Total time spent in the generation phase for all projects, including compilation fetch time: 464.94 seconds Only 12% gain here, but still nice to have. |
| { | ||
| internal interface ILsifJsonWriter | ||
| { | ||
| void Write(Element element); |
There was a problem hiding this comment.
❔ Do we still need this one?
There was a problem hiding this comment.
yup. several callers call directly into that one. I could have them wrap into a single-element list, but it seemed wasteful :)
You'll get at least 60 seconds gain my moving from MSBuildWorkspace to direct creation of compilations from csc invocations in the binlog. MSBuildWorkspace is extremely terrible for end-to-end performance because there is no parallelism in the MSBuild evaluation. csc invocations have a secondary benefit of improved accuracy. |
Definitely agree. I'm just very limited on time to here :) |
We would often write out tens of thousands of elements per file, taking locks for each eleemnt we're writing. We can just take the lock once and write out the full batch.
Before time:
After time:
This is an improvement of 25%.