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

Remove dynamic keyword #139

Merged
merged 3 commits into from
Jul 8, 2021
Merged

Remove dynamic keyword #139

merged 3 commits into from
Jul 8, 2021

Conversation

humhei
Copy link
Contributor

@humhei humhei commented Nov 6, 2019

fixes #138

@Horusiath
Copy link
Contributor

Horusiath commented Nov 6, 2019

Hi @humhei. Did you run actual benchmarks? We know that a single run can take time, but DLR specialization can speedup things on subsequent runs (that's precisely why dynamic is used there). Things like this, code warmups and many more are reasons why we should use tools like BenchmarkDotNet not the test explorer. Before merging, this needs a verification.

@humhei
Copy link
Contributor Author

humhei commented Nov 6, 2019

It's may be my fault,
I misunderstand that dynamic will recompile every time when geneirc type T changed,
But it seems it only compile one time
even though generic type changed, it never compile again

I encounter this issue when i programming in UI side,

It have a obvious Pause after i send message to server at first time
Maybe i can solve this problem by warmup int [] first

@Aaronontheweb
Copy link
Member

@Arkatufus in light of the changes made to #235, this PR should probably be safe right? Performs the same cleanup in one more spot.

@Arkatufus
Copy link
Contributor

Casting an object directly to Array might cause a problem with ValueType arrays, let me do a quick test first.

@Arkatufus
Copy link
Contributor

Code is good, tested it and it works.

@Arkatufus Arkatufus merged commit f652d7c into akkadotnet:dev Jul 8, 2021
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.

[Array]Serialization using dynamic keyword is very slow
4 participants