Skip to content

Looking for a better way to trace source generator and code refactoring performance #71429

Closed Answered by CyrusNajmabadi
OronDF343 asked this question in Q&A
Discussion options

You must be logged in to vote

Using GeneratorTracer I can see that my generator is being called ~30 times during the operation

This was addressed in #70466 and #70477.

with each call taking 75 ms on average.

Woof. That's a reallllly slow generator. For context, an IDE feature needs to run in a few ms tops (with 50 being the high water mark where we consider things to be seriously problematic). Having a generator itself take 75ms effectively means that every semantic feature is now over budget.

For context, getting the compilation after an edit (without SGs) should take microseconds.

We're adding docs here: #71059 to help explain how to write a good incremental generator.

I am working on an incremental source gene…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@OronDF343
Comment options

@sharwell
Comment options

Answer selected by OronDF343
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants