tomhughes left a comment (openstreetmap/openstreetmap-website#7089)
As you say I mentioned on the call last night that dropping `public` would be
more helpful than dropping `trackable` because there are really only two
queries not four and reducing that to one is what will really simplify things.
The end goal needs to be to get rid of the page number argument and replace it
by a cursor so that subsequent fetches can use an index to start from the right
point rather than having to start form the beginning each time - if we got rid
of `private` and `public` then we could hopefully use the trace ID as the
cursor - fetches would no longer be exactly 50K points but would stop at the
end of the current trace once the limit was reached then the next fetch would
start from the next trace.
That does presume that we can persuade postgres to efficiently combine a
select/sort on trace ID with a bounding box query but hopefully that should be
possible.
An alternative might be to allow user to ask for ordered or unordered points
but not both so to get everything would need two sets of fetches. I'm not sure
what we could use as a cursor for the unordered points though - it would likely
have to be something like a tile number.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/7089#issuecomment-4462187555
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/issues/7089/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev