Skip to content
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

Fixes and add missing index for simple search #2955

Merged
merged 3 commits into from
Oct 5, 2020

Conversation

valentijnscholten
Copy link
Member

New PR because the previous one (#2952) was messed up by the merge/push problem we had on the dev branch.

Search / autocomplete related:

  • optimized queries for autocomplete to run without ordering
  • add index on component_name field
  • limit max results for autocomplete to 20000 to avoid 5MB javascript snippets (DD_MAX_AUTOCOMPLETE_WORDS, MAX_AUTOCOMPLETE_WORDS in settings.py)

I think with the index it still performs OK even with 750k findings, but probably not usefull in that case to send 5MB of javascript to the client. Might need a better autocomplete in the future, ajax based.

@madchap madchap requested a review from Maffooch October 3, 2020 15:53
@valentijnscholten valentijnscholten added New Migration Adding a new migration file. Take care when merging. performance performance improvement or bug report settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR labels Oct 3, 2020
@madchap
Copy link
Collaborator

madchap commented Oct 5, 2020

Just pulled it locally over a 750K findings instance, works much better, thanks :-)

@madchap madchap requested a review from mtesauro October 5, 2020 05:24
@valentijnscholten valentijnscholten merged commit c2e5060 into DefectDojo:dev Oct 5, 2020
@valentijnscholten valentijnscholten deleted the fix-cb-search branch October 5, 2020 17:09
@valentijnscholten valentijnscholten changed the title Fix cb search Fixes and add missing index for simple search Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix New Migration Adding a new migration file. Take care when merging. performance performance improvement or bug report settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants