Working on cleaning up the layout a bit.

I know I’ve asked these questions in the past, but I’m going to ask them again on the off-chance that opinions have changed. Seeing as I’m completely unable to come up with a new layout for the site that I’m happy with I’m in the process of trying to clean up the current layout a bit to improve the rendering speed a touch. For example, if I completely remove the left sidebar the page rendering time jumps up significantly so I know I’m doing a lot of crap on the side that slows things down a bit. I need to know what aspects of the sidebar folks use and want me to keep and which parts I can remove starting with the Stupid Evil Comments list. Does anyone actually use that list to check out what the most recent comments are? How about the Threads With New Comments list? Is that useful? The Archives List doesn’t take too much processing time so that seems to be safe to leave there, though I suppose there’s no real need to list off the months in that spot. I could just make it a link to a subpage. Additionally, do folks use the Most Recent Comments list I put underneath each entry? That uses a custom query which would probably speed up rendering a bit if I removed it.

Another question I have is in regards to the comment pages themselves. Currently I have the recent comments list set up to link straight to the comment in question, but this prevents me from using one of EE’s better features: Comment Pagination. Some of the threads here get really long and I’ve had to close them down because with nearly 400 comments it takes forever for the page to render, but if I were to use the pagination feature we’d eliminate that problem because it would only render 25 or 50 or however many comments we wanted per page. Because pagination is handled directly in each module of EE, though, I can’t build links in the Recent Comments list that take it into account. I figure the only way I could generate a Recent Comments list that is pagination aware would be to come up with a custom plugin for it as it would need to not only query the comments database for the most recent comments, but also the weblog database for each entry to see how many comments each one has and then divide by the current pagination setting.

So speak up and let me know what you want to see stay and what you want to see go and I’ll see if I can’t improve the speed of things around here a bit.

21 thoughts on “Working on cleaning up the layout a bit.

  1. Hmm. Well, I have to admit that speed here has never been an issue for me, everything seems to load nice and quick. But if it’s bogging others down I guess you must make changes…

    I need to know what aspects of the sidebar folks use and want me to keep and which parts I can remove starting with the Stupid Evil Comments list. Does anyone actually use that list to check out what the most recent comments are?

    Actually, that’s the one thing I use the most. It gives me a quick refernce to what threads are getting hit and the kind of posts the threads are getting. Then I click into the thread from that list.

  2. Keep the “Threads with New Comments” list!

    I’ve never had problem with the site loading either, though “Stupid Evil Comments” has no impact on my use.

    Don’t know about pagination, I don’t keep up to speed on that sort of thing.

  3. I use the StupidEvilComments to see new comments but I suppose if it takes a lot of processing it isn’t exactly “mission critical”.


    You could also take these 22 images and make a single, 11kb image out of them.  Then use a client-side image map to link them.  It would feed a lot faster.

  4. It would be nice to have the pages load up faster- there is a noticeable delay whenever I browse any SEB page.

    I always use the “Threads with New Comments” list to keep on top of what’s happening in the comments part of the site.  Please keep this option- it’s invaluable for busy people like myself!  The rest of the left sidebar is not too useful; in fact, I’ve only used the archive links.

    Having your personal stats is interesting, but if it slows down the page load times then perhaps a link to a personal page or something else that would speed up the main page.  I don’t think that it presents any useful information to anyone who is not a first time surfer of the site.

    I used to use the “Most Commented Threads” links to reference interesting discussions, but that list seems to disappear and reappear.  It would be really useful to have something like a “Selected Most Interesting Threads” list where you could hand-pick some of the good discussions as primers for particular topics.  It might even keep down the amount of re-hashing of the same old arguments, since newcomers could easily see what’s already been argued to death.

  5. I’ll be a ditto-head and say that I find the Stupid Evil Comments and New Comments lists very useful.

    Even though I’m on dial-up, I can just scroll down to see the lists while I wait for the main page to load, so no real harm in the wait smile

  6. I, too, regularly use the “SE Comments” section, but never the the “New Comments” portion; I merely hover over the SEComm’s links to see which thread they were posted.  Maybe consolidate the two sections, visually linking/grouping each new comment with its respective thread.  Merging these two portions might also cut down on rendering time, and even save a trip to the database (depending upong the Selection statement used—as one statement could gather both info pretty easily).

    The other sections on the left sidebar i don’t find very useful and, more importantly, jumbled looking.  The quote can be occasionally interesting, but (to me) is akin to cherry picking verses from Tanak/Koran/CommunistManifesto to support this or that agenda.  And the personal stats and server technical info (page rendered) i’m not sure many use, except first-time visitors, advert subscribers (!), or potential geeky website-stalkers (do these exist yet?).  Case in point, i’ve never felt a burning desire to know what users are currently browsing the site, how many queries ran, or current guests (282? like within the last hour? last 4.5 hours? last day?).

    And, i dare say, the Links and Buttons portions have always appeared as if their overall content was developed by a Bangladeshi minicab decorator.  Everything is quite symetrical, and each button is aesthetically pleasing in its own right.  But, the individual images don’t necessarily look well together—unless they were to follow some uniform style/color-combo.

    Uh, and the WeatherUnderground at the bottom…  Ugh.  Very Tripod/Lycos-esque.

    That all said, your mugshot at the top is an excellent idea and should shape the site’s overall aesthetic.
    More of that, less of not.

    rob@egoz.org

  7. I don’t use the new comments or most comments or recent comments or any of those sections.  I do use them on my own blog, however, so consider what *you* find useul, Les.

    Rather than list the individual comments, though, I think you could get by with the “Threads with New Comments” section alone.  That could just link to the top of the comment stream, so you wouldn’t have to worry about the pagination thing.

  8. What Tish said.  I’m on dialup too, and the “Stupid Evil Comments” and the “Threads With New Comments” are the first places I look.  As a matter of fact, were I the President and Dictator For Life of SEB, I’d put ‘em both right below the “Stupid Evil Quotes”. 

    Yessir – I would.

  9. One other thing that seems to cause slowness on loading is the number of queries.

    While it is not very high, the page load times make it feel like the underlying database is missing a few needed indexes and/or the queries done are not using the available indexes.

    If you are interested in trying to speed them up a bit, I would be more than happy to run some diagnostics on them and send you back a list of any tweaks that could be made to make them faster.

    To do this, I would need (a) an export of the database structure for tables queried [ no data, just structure ] and (b) a list of the queries used to gather data.

    To easily check up on what can be done to speed up mysql queries, one simply prefaces a query with the word “explain”. e.g. if your query is “SELECT x FROM myTable WHERE id = 1”, you would run “EXPLAIN SELECT x FROM myTable WHERE id = 1” to see how the query is going to be processed.

    Full information on this is available at mysql explain docs.

    Looking over the obviously used queries on a page:

    Stupid Evil Quotes
    It looks like you simply grab a quote from somewhere. If the table containing quotes has an ID column (or other indexed identifying column) that is sequential, you can use MAX() to get the highest number, randomly select a number in the range, and select that item.

    Stupid Evil Stats
    If this comes from a database, hardcoding the query to select only displayed data via your id in the system would be fastest.

    Stupid Evil Members
    For the currently logged in query, make sure that only the data wanted is returned (names of those logged in with information to create the links) and that the row being used to select off of is indexed. If there is a very limited number of possibly valid entries (e.g. yes/no), you may need to use FORCE to make sure that it uses an index (provided that the column in the where clause is indexed)

    For number of members, the same idea should be used. Likely someting along the lines of “SELECT COUNT(id) FROM xTable FORCE INDEX idx_user_status_01 WHERE yStatus = 1;”

    This would make it use the named index when processing the where clause. Indexes are often ignored by mysql if there is a very limited number of possible values…even though using them will often still speed up performance.

    Last Update, Last Comment, Most Visitors
    These really depend on how the structure looks, but should generally select via an indexed timestampt table.

    Stupid Evil Comments
    These likely select some number of entries ordered by the timestamp created with some associated data.

    All info displayed can likely be done in a single query with proper joins. The most important parts are going to be (a) making sure to select off of an indexed date/time, (b) making sure that all joins are upon indexed fields and that the indexes are used (remember EXPLAIN above), and (c) selecting only the data one is interested in.

    e.g.

    SELECT suser.userName, suser.email, LEFT(comment.text, 125) as suserTxt, comment.url
    FROM comment
    LEFT JOIN suser ON suser.suserID = comment.postedbyID
    ORDER BY comment.postedAt desc
    LIMIT 8

    Threads with new comments
    Like the most recent posts, this should be able to be done as a single query using joins on indexes.

    List of entries on main page
    This should also be able to be done as a single query with proper joins and indexes.

    Summary
    Anywise, if you have the time to grab structures and used queries, I would be happy to go over them and point out anything I find to speed them up for you. Just from seeing Page rendered in 7.1092 seconds 93 querie(s) executed, I am betting that most of the slowness is because of both the number of queries that are used (which I can likely reduce greatly for you) and missing or unused indexes (which I can point out and provide code to create and reference properly).

    I just recently did this on one of the sites I work on and trimmed down 20 queries taking 3 seconds to processed…resulting in 3 queries taking no more than 0.02 seconds to process.

    Proper queries and indexing are the most common problem areas for speed in referencing databases. Unfortunately, most people writing blogs and message boards are not very experienced with database optimization even if they are great with coding in general.

    You should have my email address on file. If you do not have access to it but would like to have me at least take a stab at it, post back and I will email you with my contact information. If you need any help getting proper exports of data structures let me know.

  10. Keep the “Threads with new comments” (you could kick the “New Comments” instead, since that sorta doubles it). But the “Threads with new comments” helps you get up to speed once your were away from SEB for a couple of days. It should be expanded to 20 threads in fact!

    Pagination – sure why not give it a try?

    As for the link to the forums atop the entries – I still don’t visit, so at least for me, it doesnt do much.

  11. I read the quote. Never look at the new comments (too hard to read them), sometimes look at the threads with new comments. Never go to the forums so I think just a link to the forums might do. Your pages load VERY slowly on my fast cable, fast computer setup. And if you figure out what’s slowing stuff down, would LOVE to know what the fixes are so I can apply them to my EE sites!

    What would really make me happy is a stylesheet switcher with a style that isn’t white letters on black—or at least some work on the typography to make the text more readable (more leading, maybe? A different font?) (I think my eyes are aging in dog years … )

    Oh, I don’t use the blogroll much, either. Don’t know if that slows anything up or not.

  12. Keep:
    Stupid Evil Quotes
    Stupid Evil Members
    Stupid Evil Stats
    My Political Compass
    Stupid Evil Comments
    Stupid Evil Donations

    No Opinion:
    Threads with New Comments
    Stupid Evil Blogroll(I never do anything with it but it sounds like it gets used a lot)

    Dump:
    SEB Guest Bastards
    Jenkins Online (seriously how much use does the forum get?)
    Stupid Evil Archives
    Stupid Evil Links
    Stupid Evil Buttons

    And definitely paginate 30 or 40 comments per page seems to be the magic number with my experience.  I’m on a T1 and still get a few seconds delay before SEB loads when I click my bookmark or an email link to the site.  I like the idea of having a personal info page which could encompass the stats, compass, donations, links and blogroll plus anything else you can think of.

  13. actually I never bother with the sidebar at all, just pop by now and again to see your latest rants/posts/thoughts.  If something catches my attention, all well and good wink

  14. Get rid of the forum area at the top of the main page.  In fact, you may want to ditch the forum completely.  I just don’t think it works for this type of site.

  15. I don’t use the new comments or most comments or recent comments or any of those sections.  I do use them on my own blog, however, so consider what *you* find useul, Les.

    What the website owner finds useful?  (…omg)
    Lemme guess, you work at Microsoft’s future-feature development dept right?

    Guest-centric works best, always.

    rob@egoz.org

  16. Guest-centric works best, always. (Rob)

    Rob, I don’t ask guests to my home how I should arrange the cups in the cupboard; Les is doing just that so it makes sense for him to strike a balance that includes his own convenience and reflects his design sensibilities.  I fancy most visitors come here for the content, not the layout.

  17. About the only thing I see that would be superfluous for me and might speed up the site would be the Most Recent Comments list underneath each entry. I use all the other goodies for most of the reasons posted here. Pagination looks like a good solution, too.

  18. Well, poop, you offloaded the one feature I use more, the “most recent commenters” list on each entry.  Which I use to see if anyone has responded to a post after me (esp. you).

    But, then, it *is* your site … grin

  19. I took it off to see if it made the page render any faster, but it doesn’t make a big difference and I do use it myself so I’ll put it back.

  20. Les, out of curiosity, do you have a development site? On a spare PC at home, say? Even if you don’t faithfully replicate your host’s environment, it should be a lot easier to pinpoint performance bottlenecks using a development rig instead of the live site (not that I usually take my own advice).

  21. I had one set up for awhile, but have since had to dismantle it. Truth be told I think most of the performance issues has to do with the fact that I’m on a server that hosts a lot of MovableType blogs. Though the alternate templates all load pretty quickly.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.