Stories
Slash Boxes
Comments

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 17 submissions in the queue.
posted by on Wednesday January 09 2019, @12:59PM   Printer-friendly
from the better-late-than-never dept.

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.

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3, Informative) by martyb on Wednesday January 09 2019, @11:19PM

    by martyb (76) Subscriber Badge on Wednesday January 09 2019, @11:19PM (#784330) Journal

    Wouldn't this break existing URLs that link to specific pages?

    tl;dr: Depends on what you mean by 'existing'. A URL containing a page reference that you had saved away, say, as a bookmark could be a problem. But any accesses to different pages while a given page size is in effect should work fine.

    Try it! Logged-in users can already set a preference for how many comments they want to see in a page:

    1. Go to your user page: https://soylentnews.org/users.pl [soylentnews.org]
    2. Click on the "Comments" button.
    3. The 5th choice in the "Comment Settings" section is "Comment Limit".

      Comment Limit [100]
      Only display this many comments per page (or slightly more to keep threads from splitting). If set above 100, then it is ignored and this value is used instead.

    4. Set the Comment Limit to a small value, e.g. 10.
    5. Scroll to the bottom of the page and click the "Save" button.
    6. Reload this story: Meta: Late Christmas Present [soylentnews.org].

    See your new page size in effect.

    Now, given all that... if you had previously saved a link to a comment externally that referred to a particular 'page' of comments, and then tried to open that link with a new page size in effect, then, well that won't work.

    --
    Wit is intellect, dancing.
    Starting Score:    1  point
    Moderation   +1  
       Informative=1, Total=1
    Extra 'Informative' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   3