09-06-2000, 04:07 PM
This hack really reduces the load on your database server.
Each time you view a thread the php does
SELECT allowbbcode,allowhtml,allowimages,allowsmilies FROM forum WHERE forumid=$forumid
SELECT smilietext,smiliepath FROM smilie
SELECT findcode,replacecode FROM bbcode
_Per_ message.
This hack makes it happen once per thread. Basically it
caches the lookups in a local lookup table and hey presto
cuts down the hits on the database ...
To see what a difference this makes turn logging on in mysql and watch the before and after..
This is a replacement for bbcodeparse2
Go to http://forums.gameplay.com/global_hack_pt2.html
to download as it's rather large ;-)
Fodder
Each time you view a thread the php does
SELECT allowbbcode,allowhtml,allowimages,allowsmilies FROM forum WHERE forumid=$forumid
SELECT smilietext,smiliepath FROM smilie
SELECT findcode,replacecode FROM bbcode
_Per_ message.
This hack makes it happen once per thread. Basically it
caches the lookups in a local lookup table and hey presto
cuts down the hits on the database ...
To see what a difference this makes turn logging on in mysql and watch the before and after..
This is a replacement for bbcodeparse2
Go to http://forums.gameplay.com/global_hack_pt2.html
to download as it's rather large ;-)
Fodder