-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
caches activity view props to save about 0.5s per HTTPRequest to /activity on townsquare #6079
Conversation
|
||
def generate_view_props_cache(self): | ||
self.cached_view_props = self.view_props | ||
self.cached_view_props = json.loads(json.dumps(self.cached_view_props, cls=EncodeAnything)) |
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.
So sketchy... I should have never put this in the codebase in the first place LOL 😆
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.
it seems entirely ridiculous to make that the default json encoder doesnt encode datetimes..
Codecov Report
@@ Coverage Diff @@
## stable #6079 +/- ##
==========================================
+ Coverage 28.65% 28.91% +0.26%
==========================================
Files 272 272
Lines 24174 24213 +39
Branches 3537 3541 +4
==========================================
+ Hits 6927 7002 +75
+ Misses 16967 16905 -62
- Partials 280 306 +26
Continue to review full report at Codecov.
|
tests passing ... merging now |
Description
caches activity view props to save about 0.5s per HTTPRequest to /activity on townsquare
Refers/Fixes
personal gripes with townsquare speed
Testing
tested locally, works fine.