Stories
Slash Boxes
Comments

SoylentNews is people

posted by janrinok on Tuesday June 14 2016, @01:23PM   Printer-friendly
from the like-maple-syrup dept.

So, the Islamic Terrorist Opens Fire on Florida Nightclub; 50 Killed, 53 Wounded story is up over 400 comments and loading slower than hell. We finally managed to find ourselves a limit to comments under the current code. There's a fix going to be coming in the upcoming site update but for now there are two workarounds; take your pick.

  1. Change your comment view mode to Nested or Flat.
  2. Change Comment Limit under Preferences to five to ten.

The latter solution gives you 5-10 root level comments and all their children not 5-10 comments total. It also allows you to keep using the javascript expand/collapse buttons if you were.


Original Submission

 
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: 2) by Username on Tuesday June 14 2016, @04:21PM

    by Username (4557) on Tuesday June 14 2016, @04:21PM (#359971)

    Eh, I think I have all the default settings, too lazy to change unless there is -1 I wanna see. So its choking on the database requests? Maybe if a thread is over X amount of posts make it a static page on a ram disk and have the script update that instead of db?

    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 2) by The Mighty Buzzard on Tuesday June 14 2016, @04:43PM

    Interesting idea. It wouldn't work that easily because many logged in users have customized their score, visibility, and number of comments per page settings and even ACs can customize a little bit via the drop-down menus, so we'd need potentially thousands of cached versions for each story. I recently tried just using a memory cache of the same-for-all-users db results but didn't see any detectable improvement.

    Nah, what it's choking on currently is processing the templates necessary to generate a laid out comment for each of potentially hundreds of comments. With Threaded and your comments per page setting at max you see every comment for the linked story above on the first page, all four hundred plus of them. And it takes over a minute to render. Me, I'm currently thinking it'd be faster to do away with templates for comments and do the layout as hardcoded as possible.

    --
    My rights don't end where your fear begins.
    • (Score: 0) by Anonymous Coward on Tuesday June 14 2016, @09:31PM

      by Anonymous Coward on Tuesday June 14 2016, @09:31PM (#360178)

      That's the kind of thing that could be fixed with smart javascript.
      Let the posts be a static file and use javascript to apply the filters to hide/collapse based on the score.
      Might even be able to do it without javascript, just really clever CSS.

      • (Score: 2) by The Mighty Buzzard on Wednesday June 15 2016, @12:53AM

        by The Mighty Buzzard (18) Subscriber Badge <themightybuzzard@proton.me> on Wednesday June 15 2016, @12:53AM (#360293) Homepage Journal

        It'd have to be some extremely clever css. Collapsing comments below score N we can do easily through css, and already are doing so on dev, but the numeric comparison has to be done server-side unless we want to use javascript, which is a non-starter. House rule: everything has to run correctly without javascript turned on. Too many of the community block it.

        --
        My rights don't end where your fear begins.
    • (Score: 2) by Username on Tuesday June 14 2016, @10:38PM

      by Username (4557) on Tuesday June 14 2016, @10:38PM (#360216)

      Yeah could have one large template and load separate stylesheets for each level of score, comments etc. Offload it to the browser.

      • (Score: 2) by The Mighty Buzzard on Wednesday June 15 2016, @12:47AM

        by The Mighty Buzzard (18) Subscriber Badge <themightybuzzard@proton.me> on Wednesday June 15 2016, @12:47AM (#360288) Homepage Journal

        Gravis and I talked about just that a month or so ago in IRC but there are a few problems that keep it from being possible. There's processing that has to be done to the raw score and either perl has to do it or javascript does. We are moving the collapsed/non-collapsed state out to CSS but the low-hanging fruit that paulej72 and I could find is already gone.

        --
        My rights don't end where your fear begins.