reactivemarbles / ObservableEvents

MIT License
120 stars 10 forks source link

IntelliSense performance issue after migrating from `ReactiveUI.Events.WPF` to `ReactiveMarbles.ObservableEvents.SourceGenerator` #75

Closed database64128 closed 2 years ago

database64128 commented 2 years ago

After migrating from ReactiveUI.Events.WPF to ReactiveMarbles.ObservableEvents.SourceGenerator, IntelliSense becomes unbearably slow. On every change to code, it takes ~15 seconds on average for hinting and highlighting to update and show up. VS2019's editor freezes from time to time. VSCode's C# plugin with OmniSharp and default settings also suffers from this issue.

This performance issue only impacts C# code. Writing XAML code works just fine.

I suspect that the source generator runs every time the code changes. Is there a way to disable this and only regenerate on build?

To reproduce, clone database64128/youtube-dl-wpf, open a C# source file and write or change anything in it.

glennawatson commented 2 years ago

I'll take a look later today when I've done with my day job and see what comes up.

Source Generators do give you a hook to register only for specific changes which I have hooked in at the moment.

glennawatson commented 2 years ago

Can confirm that this is definitely an issue. Thanks for bringing to my attention.

glennawatson commented 2 years ago

https://github.com/reactivemarbles/ObservableEvents/pull/76 fixes this. Will test with your project soon.

glennawatson commented 2 years ago

Confirmed it's fixed for me.

database64128 commented 2 years ago

Thanks! Can confirm it's fixed for me, although IntelliSense still lags behind a second or two. But I guess this fix is good enough for now.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.