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

basic expander refactor #11089

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

basic expander refactor #11089

wants to merge 2 commits into from

Conversation

SimaTian
Copy link
Member

@SimaTian SimaTian commented Dec 5, 2024

extracting the TryExecuteWellKnownFunction and argument parsing to a separate file.

Fixes #9975
partial fix at best. Extracting the area into separate files. Further refactoring unfortunately had a performance impact so I've settled for containing the ugly area.

Context

TryExecuteWellKnownFunction is MSBuild performance hack to avoid reflection since it's slow.
Together with argument parsing, this is some 1500 lines of code that was in the Expander.cs making it hard to navigate.

Testing

existing tests should be sufficient as I did no changes to the logic and just moved stuff around. There were some rough edges that I had to clean but I hope our current test battery will be sufficient.

Notes

We should look into Reflection.Emit, custom IL generation could be a way to get rid of this hack in a performant manner. I'll add it on my to-learn list for Fridays.

@SimaTian SimaTian force-pushed the refactor_expander_basic branch from 277798f to 9a3b07b Compare December 16, 2024 12:31
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.

Refactor Expander.TryExecuteWellKnownFunction
1 participant