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

Advanced search is really slow #1185

Open
maringuu opened this issue Jan 9, 2024 · 0 comments
Open

Advanced search is really slow #1185

maringuu opened this issue Jan 9, 2024 · 0 comments

Comments

@maringuu
Copy link
Collaborator

maringuu commented Jan 9, 2024

Through the advanced search feature I was searching for OpenSSL binaries, like so:

{
    "processed_analysis.software_components.OpenSSL": {
        "$exists": "true"
    }
}

The database consists of 1,443,268 unique files in 3,235 firmwares.
This took several minutes to complete.
Even worse when clicking on the next (in my case 2000) page I had to wait another minute.
The rest API wasn't any faster, even with setting offset to zero and limit to 50.

Several improvements that we could make:

  • Speedup the code :)
  • Allow for pagination in the query

As for pagination I think offset-limit pagination always has to calculate the whole result, which can be slow.
If we used cursor based pagination, we could stop right after calculating the right amount of results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant