Skip to content

Conversation

@SergeiPavlov
Copy link
Collaborator

@SergeiPavlov SergeiPavlov commented Jul 8, 2021

Trace files show many List allocations in these parts of DataObjects

  • Sometime we know final List size to preallocate that capacity.
  • ReadOnlyList wrapper is obsolete. Can be replaced by IReadOnlyList interfacetoList<>`

@SergeiPavlov SergeiPavlov self-assigned this Jul 8, 2021
@SergeiPavlov SergeiPavlov requested a review from botinko July 8, 2021 21:05
@SergeiPavlov SergeiPavlov merged commit c911673 into master-servicetitan Jul 9, 2021
@botinko botinko deleted the optimize_RecordSetHeader_Join branch July 10, 2021 00:40
SergeiPavlov added a commit that referenced this pull request Jul 19, 2021
…st instead of ReadOnlyList to save allocations (#32)

* Optimizations: allocate List<> with known capacity; use IReadOnlyList instead of ReadOnlyList

* Optimize hot paths: replace LINQ by foreach
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