While shutting down terminal windows to the SN servers this morning, one of them had the create table syntax for the comments table still on screen. I gave it a read through just because it was there and noticed that there wasn't an index for the opid (top level comment id for speeding up entire thread pulling) column. So I got some before numbers, added one, and ran some After tests. Heavily commented stories show a 50-150% pages-per-second speed increase in threaded views. Low hanging fruit FTW.
(Score: 3, Interesting) by takyon on Thursday January 10 2019, @03:03PM (2 children)
So the comment permalinks have "page=N" on them. I changed my comments per page limit to 10 and it produces another number for the page. But both links display the exact same thing since they are actually looking at CID:
https://soylentnews.org/comments.pl?noupdate=1&sid=29494&page=2&cid=783383#commentwrap [soylentnews.org]
https://soylentnews.org/comments.pl?noupdate=1&sid=29494&page=6&cid=783383#commentwrap [soylentnews.org]
https://soylentnews.org/comments.pl?noupdate=1&sid=29494&page=190&cid=783383#commentwrap [soylentnews.org]
https://soylentnews.org/comments.pl?noupdate=1&sid=29494&page=1904249&cid=783383#commentwrap [soylentnews.org]
As you can see, even changing the page number to something absurd works.
So why is "page=N" even in the comment permalinks? Isn't it redundant linkcruft? It seems that we could remove that part.
[SIG] 10/28/2017: Soylent Upgrade v14 [soylentnews.org]
(Score: 2) by The Mighty Buzzard on Thursday January 10 2019, @05:16PM
Man, don't ask me today. I woke up late to db issues on both our bloody db servers and having to add 3-4 new sysadmins so people other than me can put out fires. My brain's fairly well toast.
My rights don't end where your fear begins.
(Score: 2) by The Mighty Buzzard on Friday January 11 2019, @12:19PM
Okay, now that I can read English again, I think that's "working as intended" though permalinks having a page number in them in the first place may not be. When you supply a cid it should show you only that comment and any below it, thread-wise. If, and only if, those comments add up to more than your max comments per page setting, they should paginate based on the comments immediately below the one whose cid was supplied. Invalid page numbers should show the first page.
My rights don't end where your fear begins.