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

v3 branch #90

Merged
merged 8 commits into from
Sep 15, 2024
Merged

v3 branch #90

merged 8 commits into from
Sep 15, 2024

Conversation

linkdotnet
Copy link
Member

This is the ongoing branch for v3.

@linkdotnet
Copy link
Member Author

Fixes #44
Fixes #59

@falvarez1
Copy link
Member

@linkdotnet what do you think about converting Task to ValueTask for IJob.RunAsync? Since this already creates breaking changes to IJob if changing to ValueTask improves performance then it can be included. Of course, I would need to run some benchmarks before making any changes.

@falvarez1 falvarez1 self-requested a review July 23, 2024 22:37
@linkdotnet
Copy link
Member Author

@linkdotnet what do you think about converting Task to ValueTask for IJob.RunAsync? Since this already creates breaking changes to IJob if changing to ValueTask improves performance then it can be included. Of course, I would need to run some benchmarks before making any changes.

That is a good idea - I didn't have very much time lately but those smaller things seemed somewhat in reach without investing hours in one session (what one would need for bigger features).

Coming back - ValueTask might be a good choice here as well. Absolutely.

@linkdotnet
Copy link
Member Author

linkdotnet commented Jul 24, 2024

I will create a ticket for that.

One has to figure out how we can "warn" users that are using Minimal API, that are returning Task and don0t get a compiler hint. We might want to transform the Task automatically to a ValueTask. In general that would be dangerous but from our libraries point of view, that should be fine.

Edit: On second thought: Maybe the risk introduced doesn't justify the benefit (if there is at all).
Given that Jobs are normally I/O bound and "slow" in nature, using ValueTask might have <0.01% impact in allocations/performance.

@linkdotnet linkdotnet merged commit 4765199 into main Sep 15, 2024
3 checks passed
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.

2 participants