If-Modified-Since, Last-Modified and Not-Modified HTTP1.1 Fields

Started by eech55, December 11, 2006, 11:51:20 PM

Previous topic - Next topic

eech55

Hello

Intro:
It would be awesome if SMF adds this feature! no other board has this feature at all. Some of them add it as mods, but it's not as good as having it by default!

Imagine number of users who will be amazed by the suprior SMF speed once they just install it! having If-modified-since, Last-modified and Not-Modified HTTP1.1 fields working properly by default will be a BIG BOOM and the forum will be BLAZING FAST and hundreds of SQL queries will be removed in case no change was made! Not only that, also the b/w will be reduced by simply sending a small HTTP1.1 reply containing "not-modified" and that's it!!

It's not hard!
What we need is to

  • every page checks the modification date for template files related to it, and if its less than or equal to "If-Modified-Since", then send "Not-Modified"
  • each page look at the date of the last post/topic and if it's less than or equal to "If-Modified-Since" send "Not-Modified"
  • for most pages it's not an issue, since most of them already take timestaps from the database, such as boardindex, messagesindex and so on
  • what about signitures? we will just add an extra database field so whenever any one updates his signiture that timestamp is also updated, this way users are able to see an up-to-date version of the board + BLAZING FAST

1st implementation
Although it's straight and forward, and things should go 99.99% as we want. But personally I always prefer sticking on the safe side as much as we can. So when this feature is newly added, we will not enabled it by default (but it comes with the default distribution). There might be some small bits here or there messing. And after few monthes when we get confident about this addition for 100%, then we will enable it by default on all versions!



Coldfx

Not a bad idea, but a majority of SMF is already PHP-based over MySQL, so obviously is faster than most forum software as is..

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

eech55

QuoteNot a bad idea, but a majority of SMF is already PHP-based over MySQL, so obviously is faster than most forum software as is..
most forums are php-based over MySQL.. I don't see why would this make SMF faster.. It sounds like you didn't try using these HTTP1.1 fields properly! they'll make it super fast!

QuoteGood idea. Try to make a mod or something if you can heh.
I'm a Perl guy, and I hate PHP programming for many reasons, basically doesn't make sense to me. I did it with Perl and it was awesome.. However PHP spreads like cancer and I have to learn it one day :).

If you want me to do a mod for it:

  • wait till I learn php
  • wait till I understand how SMF works

and currently I'm preparing for a Cisco networking certificate, so no time.. that's why I wanted SMF experts to do it! they'll do a much better job than a networking guy (me)  ;)

and btw, does this imply that SMF doesn't even have a MOD for it?!  >:(

qwerty22

That would be a good to have feature, as speed optimization has gained lots of attention (cf. http:hxxp:developer.yahoo.com/performance/rules.html/ [nonactive]), although I do not know if it would be easy to integrate it with Transfer-Encoding: chunked, as probably there are many queries to the data base.

On the other hand, as avatars (index.php?action=dlattach;attach=###;type=avatar) seldom change and probably there is only one table checked on the database to get them, this might be a low hanging fruit for this kind of optimization, because answer posts usually have many avatars.

Arantor

Well... transfer-encoding chunked is handled by Apache itself rather than at the PHP level in general.

As far as avatars go, better solution would be to shift handling away from dlattach and use static files, so that Apache can send those headers itself, this is covered in the big list of 24 things to do to make SMF run faster (see the thread in Server Performance & Configuration, it's the very first item)


Advertisement: