Paginating_fing vs limit / offset

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?

Eric G. 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

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 G. 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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs