Speed up
-
Hi, i am using vote it up and if i use the MostVotedAllTime() function the site will be slow.
To speed it up (inspired by https://www.sitepoint.com/create-a-voting-plugin-for-wordpress/) i save the count value in the metas.
votingfunctions.php (only a part)
https://pastebin.com/1dkbKpSdTo get the value i stop using GetVotes($postID) and start using
$votes = get_post_meta($postID, ‘_votemecount’, true) != ” ? get_post_meta($postID, ‘_votemecount’, true) : ‘0’;
To delete votings i modified the ResetVote Function
Additionaly i don’t need guest votings and delete all SQL Statements about that
I use it on https://www.gwinnr.de and reduce the cpu load about 90% and save 300 querries on some pages
- The topic ‘Speed up’ is closed to new replies.