Skip to content

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

Merged
yao-msft merged 2 commits into
microsoft:masterfrom
palenshus:exportVersionCompare
Nov 26, 2020
Merged

Adding export to WinGetUtil.dll to expose Version comparing#652
yao-msft merged 2 commits into
microsoft:masterfrom
palenshus:exportVersionCompare

Conversation

@palenshus

@palenshus palenshus commented Nov 24, 2020

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Comment thread src/WinGetUtil/WinGetUtil.vcxproj Outdated
Comment thread src/WinGetUtil/Exports.cpp Outdated
@yao-msft

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@yao-msft yao-msft left a comment

Copy link
Copy Markdown
Contributor

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