-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance Refactor for privacy-experience
#4192
Conversation
Passing run #4430 ↗︎
Details:
Review all test suite changes for PR #4192 ↗︎ |
I found a good caching library but it requires a newer version of the Python Redis library, which is a breaking change and will require updates on our side...going to give it a shot Nevermind we're on a really old version of |
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4192 +/- ##
=======================================
Coverage 87.67% 87.67%
=======================================
Files 333 333
Lines 20734 20743 +9
Branches 2690 2690
=======================================
+ Hits 18178 18187 +9
Misses 2093 2093
Partials 463 463
☔ View full report in Codecov by Sentry. |
@@ -174,6 +175,7 @@ def privacy_experience_list( | |||
db=db, fides_user_device_id=fides_user_device_id | |||
) | |||
|
|||
await asyncio.sleep(delay=0.001) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, where did you come up with this trick?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recall having to use this trick years ago but don't really remember where I learned it...probably from a book like Fluent Python
if I had to guess
Closes #4040
Description Of Changes
See below ⬇️
This PR will be followed up with another that focuses on adding proper Caching to that endpoint
Code Changes
drill
to give us more data for A/B testingasyncio.sleep
calls to forceprivacy-experience
to give up the event loop between heavy db callsSteps to Confirm
nox -s dev
and thennox -s load_tests
, it should be observed that the response times for all endpoints (besidesprivacy-experience
) are extremely consistent, representing that they aren't being significantly blocked byprivacy-experience
Pre-Merge Checklist
CHANGELOG.md