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......
- 11-15-2004 #1Linux 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
- 11-15-2004 #2Linux 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.
- 11-15-2004 #3
this is, in all likelihood, a server performance enhancement by jason.
- 11-15-2004 #4Linux User
- Join Date
- Oct 2004
- Location
- /dev/random
- Posts
- 404
What kind of server performance enhancement???
Originally Posted by lakerdonald
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
- 11-15-2004 #5
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
- 11-15-2004 #6Linux 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.
- 11-15-2004 #7And it sounds like phpbb could use some heavy tweaking as far as performance goes.
Originally Posted by jasonlambert
"Time is an illusion. Lunchtime, doubly so."
~Douglas Adams, The Hitchhiker's Guide to the Galaxy
- 11-15-2004 #8
use javascript!!! great lists in javascript, just reads from an array
- 11-15-2004 #9Linux 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.
- 11-15-2004 #10Linux User
- Join Date
- Oct 2004
- Location
- /dev/random
- Posts
- 404
Let me clear my side first:
Originally Posted by jasonlambert
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
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..Code:<SELECT name=xyz onSelectionChanged=window.refresh(document.formx.xyz.options[document.formx.xyz.selectedIndex])> <?php for($counter = 0; $counter < $n_forums; $counter++) echo "<option value=$url>$title</option>"; ?> </SELECT>
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


Reply With Quote
