-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
feat(page): recent scans add page jumper #2348
Conversation
Can you also include the changes in UI as well? |
Do you mean adding paging parameters in the fe as well? Of course, it's just that it takes time. 😂 |
@ajinabraham ui done! |
@miaoyc666 Do you have any suggestions for optimizing the database? I found that when the amount of data exceeds 30,000, data query will become extremely slow, even if the page display is still very slow |
When you query a database, the first thing to control is the number of rows you query. You need to add offset and limit parameters to your SQL statement for pagination queries, limiting the number of rows returned. |
@miaoyc666 thanks |
@miaoyc666 Thanks for taking your time and working on the UI bits. I will review this soon and get back to you. |
Initial testing looks good. I will see if I can improve up on the UI based on https://realpython.com/django-pagination/ |
Describe the Pull Request
When MobSF has a large amount of sample data in the system, the recent scans api speed has been very slow because it will retrieve full table data from the database.
To fix this, recent scans api add page jump, default display 10 items per page
Renderings
Checklist for PR
tox -e lint,test
StaticAnalyzer/tests.py
)Additional Comments (if any)