-
Notifications
You must be signed in to change notification settings - Fork 798
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
Optimize type interfaces reading from metadata #17382
Optimize type interfaces reading from metadata #17382
Conversation
❗ Release notes required
|
@DedSec256 Thanks for improving this. Would you be able to fix the conflicts?. I think these performance improvements will make a difference in large projects that relies on interfaces and extension attributes. |
@DedSec256 : We would be ready the merge this contribution now. Can you please resolve the new conflict Alex? |
88721e0
to
f77e5df
Compare
@T-Gro, There are some additional changes here related to reducing the copying of anonymous structures (and tuples creating) in private functions. Can I ask you to take a look yet another time? |
/azp run |
@DedSec256 before merging this - could you please update the benchmark numbers, just to make sure that they still hold after all this changed merged meanwhile? |
@psfinaki, of course, I will try to do it soon. |
|
Thanks @DedSec256 :) |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
/azp run |
Commenter does not have sufficient privileges for PR 17382 in repo dotnet/fsharp |
Continuation of #17364
As stated in #16168
![image](https://private-user-images.githubusercontent.com/26364714/345653903-26b8a412-12d7-4c98-a380-a5ba8e4681ff.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MTM1MzcsIm5iZiI6MTczOTYxMzIzNywicGF0aCI6Ii8yNjM2NDcxNC8zNDU2NTM5MDMtMjZiOGE0MTItMTJkNy00Yzk4LWEzODAtYTViYThlNDY4MWZmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDA5NTM1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNlYTI4ZGY0YjgzZjU2ZGE2ZDM0ZWVkYjFhYjE5NDFmN2FkYTA2NDAwOTczZjFiZWM3NzA2M2Y0NDYwNDU4MGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ulyk5De0P3PMjBnyKEjNsveL8oiDMHRwuJCNypT99zQ)
In this PR, reading of interfaces and generic type parameters (also necessary for reading interfaces) is optimized similarly to the above-mentioned #17364 PR.
To verify the optimizations, all readings except for the readings of interfaces and generic parameters have been removed from
typeDefReader
.The same benchmark data from #17364 was taken, and the following benchmark was written:
As you can notice, the search phase for the interface range has become faster, as a smaller amount of data is being read. The full reading only occurs when converting the found rows:
Profile for the sequential analysis of all files in Giraffe - src/Giraffe
Plans
It is also planned to make the computation of type interfaces lazy in a separate PR, since it is independent optimization/API change.