azure-sdk-for-cpp icon indicating copy to clipboard operation
azure-sdk-for-cpp copied to clipboard

Converted WinHTTP to Async.

Open LarryOsterman opened this issue 2 years ago • 7 comments

Converted WinHTTP to async operation.

Converted the HttpRequest object to be asynchronous. Split all the functionality related to an HttpRequest to a new type WinHttpRequest which encapsulates all the HTTP operations.

Along with the WinHttpRequest type, there's also a WinHttpAction which reflects a WinHTTP API call.

Pull Request Checklist

Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly:

See the detailed list in the contributing guide.

  • [ ] C++ Guidelines
  • [ ] Doxygen docs
  • [ ] Unit tests
  • [ ] No unwanted commits/changes
  • [ ] Descriptive title/description
    • [ ] PR is single purpose
    • [ ] Related issue listed
  • [ ] Comments in source
  • [ ] No typos
  • [ ] Update changelog
  • [ ] Not work-in-progress
  • [ ] External references or docs updated
  • [ ] Self review of PR done
  • [ ] Any breaking changes?

LarryOsterman avatar Oct 11 '22 21:10 LarryOsterman

@ahsonkhan Would you mind taking a look at this?

LarryOsterman avatar Oct 13 '22 17:10 LarryOsterman

Ping. I would appreciate @ahsonkhan's feedback on this one.

LarryOsterman avatar Oct 14 '22 16:10 LarryOsterman

Ping @ahsonkhan - I believe that I've addressed your concerns.

LarryOsterman avatar Oct 18 '22 23:10 LarryOsterman

@LarryOsterman, if you haven't done so, this change warrants performance testing, especially some basic storage perf test runs. We should compare baseline (main) to this PR and curl vs win http to verify that the performance is comparable.

A sanity check using steps from here would be good: https://github.com/Azure/azure-sdk-for-cpp/issues/1098#issuecomment-1075754237

ahsonkhan avatar Oct 20 '22 16:10 ahsonkhan

@LarryOsterman, if you haven't done so, this change warrants performance testing, especially some basic storage perf test runs. We should compare baseline (main) to this PR and curl vs win http to verify that the performance is comparable.

A sanity check using steps from here would be good: #1098 (comment)

In the absence of a performance pipeline (which can provide more standardized results), I have done some ad-hoc performance testing on my machine and the differences in performance are basically in the noise (over the course of the unit tests, there is a slight performance degradation but it's not clear if that is variation within the tests or something else)).

When I run the existing HTTP performance tests, the new code is basically the same as the old.

LarryOsterman avatar Oct 20 '22 18:10 LarryOsterman

@LarryOsterman, if you haven't done so, this change warrants performance testing, especially some basic storage perf test runs. We should compare baseline (main) to this PR and curl vs win http to verify that the performance is comparable. A sanity check using steps from here would be good: #1098 (comment)

In the absence of a performance pipeline (which can provide more standardized results), I have done some ad-hoc performance testing on my machine and the differences in performance are basically in the noise (over the course of the unit tests, there is a slight performance degradation but it's not clear if that is variation within the tests or something else)).

When I run the existing HTTP performance tests, the new code is basically the same as the old.

And to confirm: I'm seeing a slight improvement when running the storage tests as per #1098.

LarryOsterman avatar Oct 20 '22 19:10 LarryOsterman

Pretty ping :).

LarryOsterman avatar Oct 20 '22 22:10 LarryOsterman