the algorithm for listing old comments pages is *really* inefficient; the first few pages are quick, page 100 can take a few seconds to generate... rule34 has over 100,000 pages of comments. Limit to the first few pages for now, as I don't know anyone who even goes past the front page.
This commit is contained in:
parent
8ba22d8fbc
commit
36e443e07d
@ -146,7 +146,18 @@ class CommentList extends SimpleExtension {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if($event->get_arg(0) == "list") {
|
else if($event->get_arg(0) == "list") {
|
||||||
$this->build_page($event->get_arg(1));
|
$page_num = int_escape($event->get_arg(1));
|
||||||
|
if($page_num <= 5) {
|
||||||
|
$this->build_page($page_num);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
header("HTTP/1.0 403 Blocked");
|
||||||
|
$this->theme->display_error($page,
|
||||||
|
"This page is history~",
|
||||||
|
"Only the first 5 pages of comments are visible ".
|
||||||
|
"- 99% of the traffic to older pages was bots, and ".
|
||||||
|
"they were hammering the database o.o");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user