You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 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.
I 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.
To Reproduce
Create a python app that makes many REST requests and look at the CPU usage spike
Expected behavior
Better perf
Screenshots
The text was updated successfully, but these errors were encountered:
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 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.
I 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.
To Reproduce
Create a python app that makes many REST requests and look at the CPU usage spike
Expected behavior
Better perf
Screenshots
The text was updated successfully, but these errors were encountered: