Skip to content

Conversation

@mgravell
Copy link
Collaborator

@mgravell mgravell commented Jan 3, 2023

so we aren't limited just to ReadOnlySpan<ServerEndpoint>, and don't need the allocatey ToArray()

implemented as custom iterator which allows async and LINQ to work directly' existing code still uses span for efficiency, with the new API used in limited scenarios only

intent here:

  1. provide an efficient basis for filtered "all server's matching X" functionality
  2. provide the Where(CommandFlags) basis for upcoming broadcast work
  3. avoid some unnecessary allocations

@mgravell mgravell marked this pull request as ready for review January 4, 2023 09:37
Copy link
Collaborator

@NickCraver NickCraver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks awesome - no notes, much cleaner and dig the implementation. Good call going this route!

@NickCraver NickCraver changed the title better API support on ServerSnapshot ServerSnapshot: Improve API and allow filtering with custom struct enumerator Jan 4, 2023
@NickCraver NickCraver merged commit c4e5453 into main Jan 4, 2023
@NickCraver NickCraver deleted the marc/server-snapshot-fun branch January 4, 2023 13:59
@NickCraver NickCraver mentioned this pull request Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants