Straw man fix for gitcoin.co/townsquare?dressing=1 being hella flow #9250
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Looking at the datadog trace its clear to me that the lookup for activity counts (to show on the badges) is the slow part in a production like env
this pr removes those, under the judgement call that the badges arent worth a 30s load time (and the subsequent load on the db that comes from that).
in the future, refactoring on the activity table (maybe just a db index, but it probably is getting big enough it doesnt belong in postgres too) may be necessary if we want to query this table deeply in the future
Refers/Fixes
https://gitcoincore.slack.com/archives/CAXQ7PT60/p1625158054329700
https://app.datadoghq.com/apm/traces?query=env%3Aprod%20service%3Adjango%20resource_name%3A%2Atownsquare%2A%20%40duration%3A%3E%3D12.5s&index=apm-search&spanID=1926285002054291218&streamTraces=true&traceID=15069572059855755779&start=1625234553487&end=1625235453487&paused=false
Testing
Tested Locally