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

Adding export to WinGetUtil.dll to expose Version comparing #652

Merged
merged 2 commits into from
Nov 26, 2020
Merged

Adding export to WinGetUtil.dll to expose Version comparing #652

merged 2 commits into from
Nov 26, 2020

Conversation

palenshus
Copy link
Contributor

@palenshus palenshus commented Nov 24, 2020

Adding new export, WinGetCompareVersions, which compares two versions for ordering purposes. This allows other tools and services to be guaranteed the same version sorting when working with the OWC that WinGet uses.

Microsoft Reviewers: Open in CodeFlow

@palenshus palenshus requested a review from a team as a code owner November 24, 2020 05:58
@palenshus
Copy link
Contributor Author

Did some perf testing and comparisons against just passing in the entire array of versions to be sorted in from .NET and marshaling the sorted array back out. Surprisingly, it's actually faster to do it this way. Took about 12s to sort 10k versions using this method, and 15s to pass in and sort the entire array. Since this code is also cleaner and simpler, seems like a win-win.

@yao-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yao-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@yao-msft yao-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@yao-msft yao-msft merged commit 4d8b74f into microsoft:master Nov 26, 2020
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