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

Avoid too many dictionary resizing to improve performance #729

Closed
wants to merge 2 commits into from

Conversation

MoSelem
Copy link

@MoSelem MoSelem commented Aug 2, 2023

No description provided.

@StefH
Copy link
Collaborator

StefH commented Aug 9, 2023

@MoSelem
Did you use any memory analyzer to find this issue?

@MoSelem
Copy link
Author

MoSelem commented Aug 9, 2023

Yes, by analyzing AzureProfiler stack traces for a high "System.Int32[]" allocations, I noticed dictionary resizing happens multiple times through

System.Linq.Dynamic.Core.DynamicExpressionParser!ParseLambda
System.Linq.Dynamic.Core.Parser.ExpressionParser!.ctor
System.Linq.Dynamic.Core.Parser.KeywordsHelper!.ctor
mscorlib.ni.dll!System.Collections.Generic.Dictionary`2[System.__Canon,System.__Canon].Insert(System.__Canon, System.__Canon, Boolean)$##6003A62
mscorlib.ni.dll!System.Collections.Generic.Dictionary`2[System.__Canon,System.__Canon].Resize(Int32, Boolean)$##6003A65
clr.dll!`dynamic atexit destructor for 'AppDataPathHolder''
clr.dll!SVR::gc_heap::fire_etw_allocation_event
clr.dll!CoTemplate_qqhxpzqp
ntdll.dll!EtwEventWrite
ntdll.dll!EtwpEventWriteFull
ntdll.dll!ZwTraceEvent
System.Int32[]

@StefH
Copy link
Collaborator

StefH commented Oct 29, 2023

because of PR #755, this PR is not valid anymore

@StefH StefH closed this Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants