daveoftheparty / speedy-moq

Generate boilerplate code for Moq in C#
MIT License
1 stars 0 forks source link

performance: Diagnoser #5

Closed daveoftheparty closed 3 years ago

daveoftheparty commented 3 years ago

After coding up Features.MoqGenerator.Diagnoser, I realized it would probably be faster to just do string matching on the using statements before building a syntax tree. Might want to change this and/or benchmark it.

Snackeroo commented 3 years ago

For now string matching before building a syntax tree is an immediate solution. How would you benchmark it?

daveoftheparty commented 3 years ago

While working with another bug (issue #19 ) I realized I had to do some minimal string parsing anyway, so I went ahead and looked for the using imports before invoking any roslyn/syntax trees/compilations.