Title: Reuse HttpClient and HttpClientHandler in Web Cmdlets · Issue #6156 · PowerShell/PowerShell · GitHub
Open Graph Title: Reuse HttpClient and HttpClientHandler in Web Cmdlets · Issue #6156 · PowerShell/PowerShell
X Title: Reuse HttpClient and HttpClientHandler in Web Cmdlets · Issue #6156 · PowerShell/PowerShell
Description: HttpClient and HttpClientHandler, while implementing IDisposable, are intended to be reused. not re using HttpClient results in significant overhead and loses out on the ability to reuse TCP pools. We currently create and dispose HttpCli...
Open Graph Description: HttpClient and HttpClientHandler, while implementing IDisposable, are intended to be reused. not re using HttpClient results in significant overhead and loses out on the ability to reuse TCP pools....
X Description: HttpClient and HttpClientHandler, while implementing IDisposable, are intended to be reused. not re using HttpClient results in significant overhead and loses out on the ability to reuse TCP pools....
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/6156
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Reuse HttpClient and HttpClientHandler in Web Cmdlets","articleBody":"HttpClient and HttpClientHandler, while implementing IDisposable, are intended to be reused. not re using HttpClient results in significant overhead and loses out on the ability to reuse TCP pools. We currently create and dispose HttpClient and HttpClientHandler instances on every call to the web cmdlets. With large numbers of HTTP requests this can get expensive.\r\n\r\nWe should investigate the introduction of a single HttpClient/HttpClientHandler. One of my specific concerns is that it may not play nicely in multi-threading scenarios. a `static` instance of these is supposed ot be thread safe, but, I have no clue if a change in one thread to HttpClientHandler.Credentials (for example) will have an impact on the handler in another thread. *shrugs","author":{"url":"https://github.com/markekraus","@type":"Person","name":"markekraus"},"datePublished":"2018-02-14T19:13:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/6156/PowerShell/issues/6156"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:146c364c-644e-fc3c-645d-2ebfac53e8a0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8B32:C9C8C:71A555:A3CA2E:6A549280 |
| html-safe-nonce | a0b81bb3a07e3c06abab54c4ba930e4b1f7d78287e8a85616eff6074294819cb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjMyOkM5QzhDOjcxQTU1NTpBM0NBMkU6NkE1NDkyODAiLCJ2aXNpdG9yX2lkIjoiODUyNzc3OTU2MjI0MzAwMzAwOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cfa356852224b479cd00e17363bcc1df3923cda8d4a43971ac41c6db69e4d124 |
| hovercard-subject-tag | issue:297212422 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/6156/issue_layout |
| twitter:image | https://opengraph.githubassets.com/07bc191b5c7671ad6448f4e9086a95258a27c3349bbe2996b665503e175e440d/PowerShell/PowerShell/issues/6156 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/07bc191b5c7671ad6448f4e9086a95258a27c3349bbe2996b665503e175e440d/PowerShell/PowerShell/issues/6156 |
| og:image:alt | HttpClient and HttpClientHandler, while implementing IDisposable, are intended to be reused. not re using HttpClient results in significant overhead and loses out on the ability to reuse TCP pools.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | markekraus |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f8cfff6384f62259baea531c7f58bc7040f8dd92 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width