Skip to content

Conversation

@strig
Copy link
Contributor

@strig strig commented Feb 18, 2023

When profiling requests with a huge number of queries sometimes we end up with multiple pages. Since the sql page only sorts current lines it's hard to see all the heaviest queries on one page and there's no way to see more than 200 since the limit is hardcoded.

This will allow the user to specify a page size via URL param e.g. &per_page=300.

When profiling requests with a huge number of queries sometimes we end up with multiple pages. This will allow the user to specify a page size via URL params.

def _page(request, query_set):
paginator = Paginator(query_set, 200)
per_page = request.GET.get('per_page', 200)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's make sure this is actually an int, especially because the input is coming from an external source.

@strig
Copy link
Contributor Author

strig commented Oct 31, 2025

@albertyw thanks, good call. Added a check and default value for the page size, and updated tests.

I've also added a selector in the top bar:

SCR-20251031-qwfy

@albertyw albertyw merged commit 1b68320 into jazzband:master Nov 1, 2025
91 checks passed
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

Successfully merging this pull request may close these issues.

2 participants