Skip to main content
Topic: [RC2] recent posts (Read 2861 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[RC2] recent posts

Why are we having ten pages if there aren't any posts?  ;)

It's the link in info-center to all recent posts. My forum has only four posts till now, so here should be only one page.

Re: [RC2] recent posts

Reply #1

hmm.. I thought this bug was present only for "big" forums, but probably we broke something at some point. lol

Long story: count (with JOINs and conditions) is one of the lowest things SQL does (because it has to "build" the entire set of records and then count each one of them until it reaches the end.
This particular count is one of the slowest of the entire code, for that reason if the forum is (I should say "should be") "big", ElkArte just sets the maximum number of entries it will display as "count" (i.e. 10 pages) as a shortcut to avoid having to run a very slow query and have the user wait for... dunno, several seconds (more) the page.

I'm not sure removing this altogether is "nice", it may impact on performances, one option that comes to my mind consists of removing the normal pagination and put just "prev | next" and then use some AJAX magic to fetch a "proper" pagination (cached).
Bugs creator.
Features destroyer.
Template killer.

 

Re: [RC2] recent posts

Reply #2

AJAX for pagination makes sense.