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

fix/optimize search and autocomplete #2952

Merged
merged 3 commits into from
Oct 2, 2020

Conversation

valentijnscholten
Copy link
Member

@valentijnscholten valentijnscholten commented Oct 2, 2020

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.

@valentijnscholten valentijnscholten added bugfix New Migration Adding a new migration file. Take care when merging. settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR labels Oct 2, 2020
@valentijnscholten valentijnscholten merged commit 436b441 into DefectDojo:dev Oct 2, 2020
@valentijnscholten
Copy link
Member Author

Not sure what happened here, I think I pushed the wrong branch or clicked the wrong button. But it's merged now lol.

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. 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

2 participants