01-19-2008, 12:25 AM
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 ).
(Just FYI, the preparser cache is installed on these boards)
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.12 files are included for convenience.
Installation isn't too difficult (if you haven't modified any files yet) - just upload the contents of the /inc folder to the inc folder in your forum installation directory. Next, just upload the contents of the /premodified folder to the root of your forum installation directory. Finally activate the plugin in the AdminCP.
Please feel free to ask any questions, report any bugs, provide suggestions or give any comments. Thanks!
Update: 1.0
- Fixed /me glitch
- Fixed glitch involving multiple concurrent updates (ie multiple people posting at the same time)
[attachment=69]
Older versions[attachment=2](note, contains premodified 1.2.11 files)
- 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 ).
(Just FYI, the preparser cache is installed on these boards)
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.12 files are included for convenience.
Installation isn't too difficult (if you haven't modified any files yet) - just upload the contents of the /inc folder to the inc folder in your forum installation directory. Next, just upload the contents of the /premodified folder to the root of your forum installation directory. Finally activate the plugin in the AdminCP.
Please feel free to ask any questions, report any bugs, provide suggestions or give any comments. Thanks!
Update: 1.0
- Fixed /me glitch
- Fixed glitch involving multiple concurrent updates (ie multiple people posting at the same time)
[attachment=69]
Older versions[attachment=2](note, contains premodified 1.2.11 files)