Skip to content

More MVVM Toolkit generator improvements#460

Merged
Sergio0694 merged 13 commits intomainfrom
dev/generator-improvements
Oct 12, 2022
Merged

More MVVM Toolkit generator improvements#460
Sergio0694 merged 13 commits intomainfrom
dev/generator-improvements

Conversation

@Sergio0694
Copy link
Copy Markdown
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
Copy Markdown
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 force-pushed the dev/generator-improvements branch from 9bef7e6 to 16b34bf Compare October 4, 2022 16:20
@Sergio0694 Sergio0694 marked this pull request as ready for review October 5, 2022 11:36
@Sergio0694 Sergio0694 force-pushed the dev/generator-improvements branch from e0e1fe6 to 0ec0746 Compare October 5, 2022 19:50
@Sergio0694 Sergio0694 force-pushed the dev/generator-improvements branch from 0ec0746 to 66dee36 Compare October 5, 2022 19:50
@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