SPIKE: assess app/dashboard/views.py/hackathon_projects case insensitive matching performance
- Dominant language
- JavaScript
- Stars
- 1.8k
- Forks
- 776
- PR merge metrics
- No merged PRs in 30d
Description
As a Gitcoin developer, I want to reduce the performance load of case insensitive matching, so we don't crash the site.
Notes:
https://gitcoincore.slack.com/archives/CDXGQRZB3/p1636074436143100
This view (app/dashboard/views.py -> hackathon_projects) is using a lot of case insensitive matching - we could do with investing some time to highlight and optimise places in the codebase which are making queries of this nature.
We can quite easily locate them (we need to search for icontain/iexact etc) but the remedies might not always be straight forward.
Like on this view we're matching the slug against the project name, and because the slug (the url fragment) could have any casing, we do a case insensitive exact match - we could store the project name in all lower case, but then we wouldn't be displaying the right casing when we show the projects name, so we will probably need to create a new field in the db to match against.
Contributor guide
Assessment
This issue has not been assessed yet.