I know that most, if not every image board script creates pages, each usually with about 10 threads each. Now, what I am wondering is how these different scripts generally handle pages. Is every one different? Or do they all just about make 100 database queries and create new static pages? And, if the latter is true, is 100 queries every time someone updates a board quite a bit, or does it just seem to be more taxing than it really is?
Thorn solves this problem by not actually generating pages until they're requested.
As for other scripts, keep in mind that, on most image boards (4chan's more active boards being the exception), posting is actually quite rare, happening maybe ten to thirty times a day or less. So yes, it's a massive call to make all at once, and definitely a dumb brute-force solution to the problem (I think Thorn's method is better, but of course I pretty much have to), but it doesn't need to happen very often.
Needs to say that all pages are generated from a single SQL query: script just pulls whole table.
As >>4 says, Wakaba pulls the whole table and builds all pages from that. There's some trickery to get the posts in the right order without having to do any subqueries, or sorting by hand. I forget what the original Futaba script does, but I know some versions of Futallaby have done a shitload of queries to build the page.
>>4
Now, since 4chan is the exception to this, does anyone know how 4chan copes with this? Surely they don't make 100 queries every time someone posts on /b/.
>>6 I bet they used to!
Someone's refined the code since them, I'm sure.
It would be nice if 4chan would release their codeā¦
It does a SELECT * and then sorts in PHP.
Is 4Chan's code even ground-up or is it just a mod of futallaby or something?
Mod of futallaby. I don't think it even works outside where it's installed these days.