Title: REST Request can be sped up a great deal by keeping an SSL context · Issue #631 · massive-com/client-python · GitHub
Open Graph Title: REST Request can be sped up a great deal by keeping an SSL context · Issue #631 · massive-com/client-python
X Title: REST Request can be sped up a great deal by keeping an SSL context · Issue #631 · massive-com/client-python
Description: Describe the bug I am developing an app with Polygon as the market data provider. I need to make a high number of REST requests so I use many threads. I noticed a big performance impact so I did some profiling (see screenshot below) I us...
Open Graph Description: Describe the bug I am developing an app with Polygon as the market data provider. I need to make a high number of REST requests so I use many threads. I noticed a big performance impact so I did so...
X Description: Describe the bug I am developing an app with Polygon as the market data provider. I need to make a high number of REST requests so I use many threads. I noticed a big performance impact so I did so...
Opengraph URL: https://github.com/massive-com/client-python/issues/631
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"REST Request can be sped up a great deal by keeping an SSL context","articleBody":"**Describe the bug**\r\n\r\nI am developing an app with Polygon as the market data provider. I need to make a high number of REST requests so I use many threads. I noticed a big performance impact so I did some profiling (see screenshot below)\r\n\r\nI used a C/C++ profiler, so the Python part of the callstack is obscured, but you can see in the expanded call stack that the app is spending most of its time reading SSL certificate files.\r\n\r\nI found a fix that passes a ssl_context to the PoolManager when creating the base client. This greatly increased the performance of the REST client. I'm opening this issue to submit a pull request.\r\n\r\n\r\n**To Reproduce**\r\n\r\nCreate a python app that makes many REST requests and look at the CPU usage spike\r\n\r\n**Expected behavior**\r\n\r\nBetter perf\r\n\r\n**Screenshots**\r\n\r\n\r\n\r\n","author":{"url":"https://github.com/serge-rgb","@type":"Person","name":"serge-rgb"},"datePublished":"2024-03-20T05:06:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/631/client-python/issues/631"}
| 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:a7fd33f4-60ff-fc9d-5dcd-96d5550baffe |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 872C:37B798:13A75A7:1CA6DF6:6A4E45A2 |
| html-safe-nonce | 5a2c66772b9467367427999d2f608f8aad58a9551a3add2202875cd2841de483 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NzJDOjM3Qjc5ODoxM0E3NUE3OjFDQTZERjY6NkE0RTQ1QTIiLCJ2aXNpdG9yX2lkIjoiMjkzNjA5NzU5NzMyMjgzOTQ1OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9fe8107aee33ee776020f9219a41b278429a364629dee53898b2991980ade266 |
| hovercard-subject-tag | issue:2196673749 |
| 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/massive-com/client-python/631/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ca2c92c1f44ff5291c2f6229796dd56a1459578ca274a293c20ff0ec9c970000/massive-com/client-python/issues/631 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ca2c92c1f44ff5291c2f6229796dd56a1459578ca274a293c20ff0ec9c970000/massive-com/client-python/issues/631 |
| og:image:alt | Describe the bug I am developing an app with Polygon as the market data provider. I need to make a high number of REST requests so I use many threads. I noticed a big performance impact so I did so... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | serge-rgb |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/massive-com/client-python git https://github.com/massive-com/client-python.git |
| octolytics-dimension-user_id | 191946194 |
| octolytics-dimension-user_login | massive-com |
| octolytics-dimension-repository_id | 216660192 |
| octolytics-dimension-repository_nwo | massive-com/client-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 216660192 |
| octolytics-dimension-repository_network_root_nwo | massive-com/client-python |
| 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 | 9fabff9b8b127e686a3ec86f91422e818056ca2c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width