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
Fix System.Data.Linq.Binary performance #3943
Labels
Milestone
Comments
Why do you need |
I'm migrating a codebase from Linq2SQL, I will use the same entities for
both linq2sql and linq2db for a while.
Le lun. 30 janv. 2023 à 11:06, MaceWindu ***@***.***> a
écrit :
… Why do you need Binary type?
—
Reply to this email directly, view it on GitHub
<#3943 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADL36SRRM56W6SDP6NG5HLWU6HBVANCNFSM6AAAAAAUKQ6TZI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
PR is welcome. Should be easy fix. BTW, it copies |
Thanks, will do. Yes I noticed it was original behavior, it was the netcore port I used as a baseline (https://github.com/mindbox-moscow/data-linq/blob/main/Mindbox.Data.Linq/Binary.cs) that had fixed it, probably because they noticed the same thing. |
guillaume86
added a commit
to guillaume86/linq2db
that referenced
this issue
Jan 30, 2023
MaceWindu
added
status: has-pr
There is active PR for issue
and removed
good first issue
labels
Jan 30, 2023
MaceWindu
pushed a commit
that referenced
this issue
Jan 31, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While benchmarking linq2db on the Northwind sample database vs Linq2SQL (a netcore port with some little fixes), I got disappointing results on some tables, and after investigation, I found the System.Data.Linq.Binary was the issue:
The Binary constructor eagearly computes the hash:
linq2db/Source/LinqToDB/Compatibility/System/Data/Linq/Binary.cs
Line 28 in 1796892
which is just wasted cycles if you don't end up using it. The class will compute the hash lazily when needed so it can safely be removed from the constructor if I'm not mistaken.
The text was updated successfully, but these errors were encountered: