[openstreetmap/openstreetmap-website] Add total page number to notes (#2089)

Tom Hughes tom at compton.nu
Mon Dec 17 15:00:15 UTC 2018


All our recent pagination controls work by using the ID value rather
than by sorting precisely to avoid having to select them all.

Yes you could get the total count by caching, but not the current
page number and the total number is useless without that.

Tom

On 17/12/2018 14:44, Colin Smale wrote:
> If there is an ORDER BY in the query the system already has to access 
> all records. And the user profile page also has a count of changesets. 
> Maybe this is pre-calculated and kept in the user table? Can this not be 
> leveraged, or is this an example of what you are "looking in due course 
> to get rid of"?
> 
> 
> On 2018-12-17 15:36, Tom Hughes wrote:
> 
>> Sorry, but this isn't going to happen - in fact we probably need to 
>> get rid of the page number completely as computing the page numbers is 
>> very inefficient as it requires finding and counting the total number 
>> of matching records.
>>
>> As a general rule we don't accept anything which adds page counts to 
>> next/previous controls and we are looking in due course to get rid of 
>> those which already exist.
>>
>>>> You are receiving this because you are subscribed to this thread.
>> Reply to this email directly, view it on GitHub 
>> <https://github.com/openstreetmap/openstreetmap-website/issues/2089#issuecomment-447867147>, 
>> or mute the thread 
>> <https://github.com/notifications/unsubscribe-auth/ABWnLWs3P-2jaXGnuC7JOQCnQBerwb2Aks5u56vqgaJpZM4ZWdSC>.
>>
>>
>> _______________________________________________
>> rails-dev mailing list
>> rails-dev at openstreetmap.org <mailto:rails-dev at openstreetmap.org>
>> https://lists.openstreetmap.org/listinfo/rails-dev
> 
> _______________________________________________
> rails-dev mailing list
> rails-dev at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/rails-dev
> 


-- 
Tom Hughes (tom at compton.nu)
http://compton.nu/



More information about the rails-dev mailing list