Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More MVVM Toolkit generator improvements #460

Merged
merged 13 commits into from
Oct 12, 2022
Merged

Conversation

Sergio0694
Copy link
Member

@Sergio0694 Sergio0694 commented Sep 30, 2022

This PR includes a few optimizations to the MVVM Toolkit generators:

  • Make Result<T> directly equatable
  • Remove external comparers in IncrementalValue(s)Provider<T> and use equatable models directly
  • Introduce a fully equatable DiagnosticInfo model that doesn't root any compilation item
  • Fix diagnostics rooting symbols passed as formatting arguments
  • Fix ValidationInfo not being properly equatable
  • Remove unnecessary projections
  • Port ObjectPool<T> type from Roslyn
  • Add new ImmutableArrayBuilder<T> wrapper over ObjectPool<T>
  • Use ImmutableArrayBuilder<T> everywhere to reuse ImmutableArray<T>.Builder instances

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • Tested code with current supported SDKs
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

@Sergio0694 Sergio0694 added optimization ☄ Performance or memory usage improvements mvvm-toolkit 🧰 Issues/PRs for the MVVM Toolkit labels Sep 30, 2022
@Sergio0694
Copy link
Member Author

Reverting to draft as I want to explore pooling the ImmutableArray<T>.Builder instances across generators as well, and it makes sense to batch that into this same PR since it's just about general source generators improvements and optimizations anyway 🙂

@Sergio0694 Sergio0694 marked this pull request as draft October 1, 2022 02:06
@Sergio0694 Sergio0694 marked this pull request as ready for review October 5, 2022 11:36
@Sergio0694 Sergio0694 merged commit 45795f2 into main Oct 12, 2022
@delete-merged-branch delete-merged-branch bot deleted the dev/generator-improvements branch October 12, 2022 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mvvm-toolkit 🧰 Issues/PRs for the MVVM Toolkit optimization ☄ Performance or memory usage improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants