Currently, some tables are paginated and filtered in the browser (e.g., /genes/3335/similar/ and /datasets/65/similar/), whereas others are paginated and filtered on the server (e.g., /datasets/?query=MMS).
I would like to re-discuss when we use either type and potential improvements.
The reason for using server-side pagination was to speed up the loading of large tables (e.g., /datasets/?query=growth). However, now that I look at the speed of /genes/3335/similar/, I see that loading a table with ~5000 rows is not that problematic. Most likely, our past issues with performance were due to us calling object methods for each row of the table. Now we have mostly solved that issue with Django tricks (e.g., STRING_AGG, select_related, etc.). Hence my question -- do we really need to do server-side (instead of client-side) pagination and filtering? It works ok, but, to an attentive eye, it creates inconsistent expectations about responsiveness across different pages of the website (tables that look very similar behave slightly differently).
I do see one big reason for server-side pagination of search results (e.g., /datasets/?query=growth) -- the ability to save (and/or send) a link to a specific page of the results. That is possible with Django's won Paginator (https://docs.djangoproject.com/en/3.1/topics/pagination/) that passes info about order and page number via the URL parameters. Our current implementation doesn't have this feature. As a result, once you leave the search results page (e.g., /datasets/?query=growth), you can never come back to it -- if you click the "back" button on your browser, the ordering and page number are reset to default.
So, my questions are:
- Do we still need server-side pagination?
- If yes, is there an advantage in using Django Paginator (instead of our current custom implementation)?
Currently, some tables are paginated and filtered in the browser (e.g., /genes/3335/similar/ and /datasets/65/similar/), whereas others are paginated and filtered on the server (e.g., /datasets/?query=MMS).
I would like to re-discuss when we use either type and potential improvements.
The reason for using server-side pagination was to speed up the loading of large tables (e.g., /datasets/?query=growth). However, now that I look at the speed of /genes/3335/similar/, I see that loading a table with ~5000 rows is not that problematic. Most likely, our past issues with performance were due to us calling object methods for each row of the table. Now we have mostly solved that issue with Django tricks (e.g., STRING_AGG, select_related, etc.). Hence my question -- do we really need to do server-side (instead of client-side) pagination and filtering? It works ok, but, to an attentive eye, it creates inconsistent expectations about responsiveness across different pages of the website (tables that look very similar behave slightly differently).
I do see one big reason for server-side pagination of search results (e.g., /datasets/?query=growth) -- the ability to save (and/or send) a link to a specific page of the results. That is possible with Django's won Paginator (https://docs.djangoproject.com/en/3.1/topics/pagination/) that passes info about order and page number via the URL parameters. Our current implementation doesn't have this feature. As a result, once you leave the search results page (e.g., /datasets/?query=growth), you can never come back to it -- if you click the "back" button on your browser, the ordering and page number are reset to default.
So, my questions are: