Quote:
Originally Posted by buileminh
How does this impact to server load?
|
Fair question and as I'm sure it will be asked later, I'll break down the different areas of potential impact:
1. Viewing a thread
No new queries are made with this addon but there is a change that impacts the existing post query. Basically with this addon 3 additional fields are pulled from the select routine, 2 exist in the post table and one is from a join on the helpful answers table. Joins certainly add to the query length but as both keys are indexed it's minimal.
There are also a few template conditionals called; while conditionals don't do much to load on their own they do add up if you use enough.
While testing this script I used microstats to measure impact and did not identify any noticeable impact to the page rendering or CPU usage.
2. Rating a post
When a post is rated the script goes through a series of checks including 2 queries to read out data and two updates to insert the vote record and change the post table. This is fairly minimal and since it's a specific request option (rather than something passive that happens when viewing a page) it should be expected.
3. Viewing the most helpful answers page
When enabled this page will run one looping query with a single join. This is not a major process at all.
4. Admin functions
The admin functions are mostly simple querying one or two times per page. The exception to this is doing a bulk delete on a user with a lot of rating history; in this case there's two queries per rating which can be intensive. As such this function is marked as being intensive.
Summed up
It's easy to get worried about a function like this where data is read on every post but I have done my best to minimize any impact. For example, rather than querying tables to get vote totals for every post the totals are stored with the post record and calling them up adds minimal load. Other steps are also taken to prevent load like using an array with banned members and a forum option to check if the forum is allowed to use the addon rather than querying the database for a standalone piece of data.
To be crystal clear, this addon has been used for over a year on a decent traffic forum that runs, as most of the users would say, fast. While there are new functions with the public release this is not an untested app and if it was impacting performance on my sites I wouldn't be using it let alone releasing it.
I'm confident this addon will have minimal additional performance impact but like every addon it does introduce more queries on some pages, more joins, more conditionals and more code which does mean more load. For larger sites I always encourage basic load testing (even just watching load times with microstats is often enough).
Hope that answers your question.