Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 28
Has it been removed??? Or is it just me not being able to see it??? It is a very handy tool to move around in the forum......
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Oct 2004
    Location
    /dev/random
    Posts
    404

    Forum selection drop-down??


    Has it been removed???
    Or is it just me not being able to see it???

    It is a very handy tool to move around in the forum...
    The Unforgiven
    Registered Linux User #358564

  2. #2
    Linux Newbie
    Join Date
    Nov 2004
    Posts
    127
    I don't see it either. Mind you I always just go back to the main forum back when I'm browsing forums, so I've never seen it.

  3. #3
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    this is, in all likelihood, a server performance enhancement by jason.

  4. #4
    Linux User
    Join Date
    Oct 2004
    Location
    /dev/random
    Posts
    404
    Quote Originally Posted by lakerdonald
    this is, in all likelihood, a server performance enhancement by jason.
    What kind of server performance enhancement???
    Instead of one direct HTTP request for the required forum from the drop-down, you now have to make >1 HTTP requests to reach to the required forum....
    It's actually increasing the no. of requests and degrading the perf...
    The Unforgiven
    Registered Linux User #358564

  5. #5
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    it reduces the size of the pages. it's really a balance between http requests and page sizes. i guess jason thinks it's more efficient i guess to have 5 http requests to several small pages than 2 http requests of insanely large pages

  6. #6
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    the problem is the inefficient SQL (a recurring issue with phpbb...) phpbb uses to generate the list.

    As it doesnt change that often, i'll work out the best way to generate the box once, cache it, then i'll give each user a profile option to add it back into the page if they so wish.

  7. #7
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    Quote Originally Posted by jasonlambert
    the problem is the inefficient SQL (a recurring issue with phpbb...) phpbb uses to generate the list.

    As it doesnt change that often, i'll work out the best way to generate the box once, cache it, then i'll give each user a profile option to add it back into the page if they so wish.
    And it sounds like phpbb could use some heavy tweaking as far as performance goes.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  8. #8
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    use javascript!!! great lists in javascript, just reads from an array

  9. #9
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    No, for the sake of love, don't script stuff! I would like to draw an analogy, where I would compare client-side scripting to bubonic plague. See, just as bubonic plague destroyed entire cities and parts of continents in the past, client-side scripting is destroying browsers today (since it is an enormous implementation of syntax, library, DOM, etc., etc., that each browser has to support, which stifles the rate of new compliant browsers). Luckily, we got rid of the bubonic plague a long time ago. Let us now try and get rid of client-side scripting.

    In other words, let us all treat and shy client-side scripting like the plague. Leprosy and Ebola would also do as proper analogies.

  10. #10
    Linux User
    Join Date
    Oct 2004
    Location
    /dev/random
    Posts
    404
    Quote Originally Posted by jasonlambert
    the problem is the inefficient SQL (a recurring issue with phpbb...) phpbb uses to generate the list.

    As it doesnt change that often, i'll work out the best way to generate the box once, cache it, then i'll give each user a profile option to add it back into the page if they so wish.
    Let me clear my side first:
    I've done a little bit of PHP and MySQL stuff - so I have a small idea of what goes into it.
    I don't know the table structure used by phpbb - have not used it for ages now. So, I could be completely wrong.

    Well, I don't see why it should be inefficient SQL - at least with respect to what we're discussing here...
    Generally, the no. forums would be fairly static - you don't keep adding or removing a forum every day or hr. So, you could just create a caching table - if required - that could store the relative URL of forums - say file.php?func=showforum&forum=xx - and index by the forum ID.

    Now, while generating the index page of the forum where all the forums are anyway listed, you could cache the forums - titles and IDs - in this table. Or, when you add or remove the forum, just update this table.
    While populating the drop-down, you just have to fire a SELECT query on this table which already has the forum ID, title and the URL. So, the HTML SELECT would be directly coded using PHP like
    Code:
    <SELECT name=xyz onSelectionChanged=window.refresh&#40;document.formx.xyz.options&#91;document.formx.xyz.selectedIndex&#93;&#41;>
    <?php
        for&#40;$counter = 0; $counter < $n_forums; $counter++&#41;
              echo "<option value=$url>$title</option>";
    ?>
    </SELECT>
    Now, if the forums are fairly constant, it could very well be put in a static PHP array - in which case, you won't even have to query the DB, plus not too much of JavaScript needed..
    Note that I don't remember the syntax correctly right now - so there are bound to be syntactical errors in the above code.
    But the point is I don't see why it could be so inefficient.

    Instead, when you have to move to the index page of the forum whenever you have to move to a different forum, you're possibly going to call the same SQL so many times and the page will be regenerated so many time - though there is a possibility of caching the index page. But in case of caching, the iicons won't be reflected properly - in fact, most of the status information won't be reflected properly; you won't get the latest of who's posted, any new posts in a forum etc.

    Also, for x HTTP requests (x > 1 - for not having the drop-down), the browser is making and breaking x TCP connections - 3 * x TCP handshakes. And when you have the drop-down (or SOME mechanism of moving to the required forum directly), you have 1 HTTP request, 1 TCP connection and 1 * 3 TCP handshakes... (just kidding... :P :P )

    Please please please.....
    if I'm wrong - which could be highly possible - please correct me....
    I'll be more than happy to accept my mistake...
    The Unforgiven
    Registered Linux User #358564

Page 1 of 3 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •