Uploads pagination is potentially slow
Categories
(Tecken :: General, task, P3)
Tracking
(Not tracked)
People
(Reporter: willkg, Unassigned)
Details
From https://github.com/mozilla-services/tecken/issues/1519
Peter wrote:
The pagination of uploads is currently done the naive way of using batch size and pages. Here and here.
https://github.com/mozilla-services/tecken/blob/a89791f9e5ac73c1ed1188d8c6a588769d756a7d/tecken/api/views.py#L392-L394
https://github.com/mozilla-services/tecken/blob/a89791f9e5ac73c1ed1188d8c6a588769d756a7d/tecken/api/views.py#L448The pagination would a lot efficient if we know the last row of the page. Then we could do...
for thing in queryset.filter(key__lt=previous_key_value)[:batch_size]: ...instead of
for thing in queryset.filter(key__lt=previous_key_value)[start:end]: ...
| Reporter | ||
Comment 1•5 years ago
|
||
Moving to Tecken product.
| Reporter | ||
Comment 2•5 years ago
|
||
I'm not hearing anyone mention slowness on this page, so for now let's make it a P3.
| Reporter | ||
Comment 3•5 years ago
|
||
I'm looking at timings for this view and I don't think it's slow. One thing I am noticing is that since the React app refreshes the uploads every like 5 seconds, it makes a ton of requests that don't seem very useful.
I think I'm going to mark this as WORKSFORME.
Description
•