Hey guys, I was reading over this. http://cardboardrocket.com/2006/09/06/paginating-find-now-even-sexier/ I was wondering why this plugin in was better than using the :limit and :offset commands? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Eric Gross wrote> > Hey guys, I was reading over this. > > http://cardboardrocket.com/2006/09/06/paginating-find-now-even-sexier/ > > I was wondering why this plugin in was better than using the :limit and > :offset commands? >I think Rails Paginate is just misunderstood, by some. It makes sense Paginate (or any other solution) will be dog-slow if one throws at it more rows than is being displayed (say :all => 10000, :display => 20). If you are using it and not finding any problems, you must be doing something right! And :limit and :offset is the key. One other ingredient I should mention is row count. This is where there may be a performance hit as it depends on which approach is used. Foo.find :all or SQL Select count(*). I believe the above plugin uses the latter. I think Rails Paginate can be made more easy to use by reducing coding "repetitiveness". Yep, another plugin is in order... Long www.edgesoft.ca --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Hmm so how is the plugin different than just using limit and offset? Is it because the plugin also returns the "page" classes as part of the result set? In http://www.igvita.com/blog/2006/09/10/faster-pagination-in-rails/, Im just not understanding what they mean by "window" class and "page" classes. Also, if you arent paginating a lot of records, lets say at most like 10 pages with 10 on each page, does all this really matter? Long wrote:> Eric Gross wrote >> >> Hey guys, I was reading over this. >> >> http://cardboardrocket.com/2006/09/06/paginating-find-now-even-sexier/ >> >> I was wondering why this plugin in was better than using the :limit and >> :offset commands? >> > I think Rails Paginate is just misunderstood, by some. It makes sense > Paginate (or any other solution) will be dog-slow if one throws at it > more rows > than is being displayed (say :all => 10000, :display => 20). > > If you are using it and not finding any problems, you must be doing > something right! > And :limit and :offset is the key. One other ingredient I should mention > is row count. > This is where there may be a performance hit as it depends on which > approach is used. > Foo.find :all or SQL Select count(*). I believe the above plugin uses > the latter. > > I think Rails Paginate can be made more easy to use by reducing coding > "repetitiveness". > Yep, another plugin is in order... > > Long > www.edgesoft.ca-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---