[okfn-help] tag list pagination

Rufus Pollock rufus.pollock at okfn.org
Fri Jan 25 10:20:39 UTC 2008


John Bywater wrote:
> Hi Rufus,
> 
> So what do you think about these changes?
> http://knowledgeforge.net/ckan/trac/changeset/216

Looks good though I haven't yet had a chance to actually run this yet :)

> For the moment, rather than disturbing the 'list' action, I've added a 
> 'page' action. It will be easy to switch this over into the list view 
> (by editing the controller's method name), and to add this functionality 
> to package and project lists.

Looks great. By the way, perhaps I should have mentioned this before, 
but I assumed you might have seen it when getting up to speed on pylons 
but there is some paginate functionality in webhelpers (bundled with 
pylons and available as "h.**" in templates etc):

   <http://pylonshq.com/WebHelpers/module-webhelpers.pagination.html>

I have not actually used this yet so don't know how useful (and for 
ends) this would be good.

There's also this module, but it seems heavily sqlalchemy specific:

   <http://paginate.workaround.org/>

> I made a class called Paginate (which we could easily copy to 
> domainmodel and use in KForge). The fit criteria I wrote are here:
> http://desire.appropriatesoftware.net/requirements/40/
> 
> Following that analysis, the only aspect I haven't implemented yet is 
> the list of all links to pages; I've done previous/next links.

That's fine for the time being I don't think we need to have links to 
all pages.

> But, considering performance, do tags appear again now? How quick is it? 
> Is it possible for us to test this new tag/page view with your ckan.net 
> data? Depending on the performance of the model list() method, we might 
> need to do something more selective. What do you know about this list() 
> method?

I think we shouldn't worry about the performance too much at present as 
that will be solved by moving to a better vdm setup. The real issue is 
just too much data (300 tags or packages at once is too much).

~rufus




More information about the okfn-help mailing list