2008-01-15, 12:39 PM
Well, I've been meaning to make this for a while now, but never got around to it.
Anyways, this is a preparser cache plugin for MyBB.
This modification does a number of things:
For those who may not understand what this does, basically, the parser is what turns MyCode into HTML. However, if you have a large number of smilies and/or custom MyCodes, the parser obviously has to do more work, replacing stuff in posts.
MyBB's parser is run every time someone views the post. That means, on a thread with about 10 posts, the parser has to go through 10 posts and parse each one.
This modification aims to lessen the load from the parser, by storing preparsed versions of posts in the DB.
How much this increases the speed of your board (primarily showthread.php) will depend probably on quite a number of factors.
I've tried to make this work as fast as possible though - preparsed messages are fetched via joins, so no extra queries are performed. Updates are performed via similar techniques as updates are performed in my MyPlaza plugin - all updates are cached, and committed to the DB via a single REPLACE INTO query (for each posts and signatures) at shutdown, to make things as fast as possible (and also won't break if the user cancels loading the page ).
In this plugin, you can specify how long posts/signatures are kept in the cache.
I haven't had much chance to test this out, but it appears to be working fine here.
Due to the nature of how this works, a large number of code edits is required. Pre-edited MyBB 1.2.11 files are included for convenience.
Please feel free to ask any questions, report any bugs, provide suggestions or give any comments. Thanks!
Anyways, this is a preparser cache plugin for MyBB.
This modification does a number of things:
- Cache preparsed versions of posts.
- Cache preparsed versions of signatures.
- Hard replace topic titles (I personally see little reason why "soft"-copies should be kept...)
For those who may not understand what this does, basically, the parser is what turns MyCode into HTML. However, if you have a large number of smilies and/or custom MyCodes, the parser obviously has to do more work, replacing stuff in posts.
MyBB's parser is run every time someone views the post. That means, on a thread with about 10 posts, the parser has to go through 10 posts and parse each one.
This modification aims to lessen the load from the parser, by storing preparsed versions of posts in the DB.
How much this increases the speed of your board (primarily showthread.php) will depend probably on quite a number of factors.
I've tried to make this work as fast as possible though - preparsed messages are fetched via joins, so no extra queries are performed. Updates are performed via similar techniques as updates are performed in my MyPlaza plugin - all updates are cached, and committed to the DB via a single REPLACE INTO query (for each posts and signatures) at shutdown, to make things as fast as possible (and also won't break if the user cancels loading the page ).
In this plugin, you can specify how long posts/signatures are kept in the cache.
I haven't had much chance to test this out, but it appears to be working fine here.
Due to the nature of how this works, a large number of code edits is required. Pre-edited MyBB 1.2.11 files are included for convenience.
Please feel free to ask any questions, report any bugs, provide suggestions or give any comments. Thanks!