Title: Hosting CPU usage increase
Last modified: August 14, 2019

---

# Hosting CPU usage increase

 *  Resolved [catshands](https://wordpress.org/support/users/catshands/)
 * (@catshands)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/hosting-cpu-usage-increase/)
 * Hello, I love everything in your plugin but have a performance issue.
    I’ve read
   your answers about admin.ajax usage for compatibility with caching plugins, but
   seems like this increase CPU usage dramatically. I have a 100 pages website with
   8.000 daily visitors, working with WP super cache + Autoptimize. After installing
   this plugin I had a 4 times increase in CP load, which seems too much. Is it 
   possible to serve users with cached rating instead, and update it only when post
   cache is updated? And in 1st place, may it even help?
    -  This topic was modified 6 years, 9 months ago by [catshands](https://wordpress.org/support/users/catshands/).
    -  This topic was modified 6 years, 9 months ago by [catshands](https://wordpress.org/support/users/catshands/).

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Support [Blaz K.](https://wordpress.org/support/users/blazk/)
 * (@blazk)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/hosting-cpu-usage-increase/#post-11833862)
 * Hi [@catshands](https://wordpress.org/support/users/catshands/),
 * this indeed seems a lot. I haven’t noticed such an increase in CPU load and I
   use the plugin on live websites as well. Are you sure that it’s the CPU and not
   the script executions? The plugin “adds” one script execution per pageview (ajax
   call) and I know that in some cases hosting providers limit these executions 
   to relatively low number for the least expensive plans (10.000 per 24h etc.).
 * I don’t think caching the output is the right way to go about this because it’ll
   be a bad user experience. For example, the visitor will see “based on 2 votes”
   but after rating the post, it will shown him “based on 5 votes”.
 * Maybe you could rewrite the JS file to load the results only when visitor scrolls
   down to the widget? I’m not sure how much this would help but it’s a starting
   point and not too much work 🙂
 *  Thread Starter [catshands](https://wordpress.org/support/users/catshands/)
 * (@catshands)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/hosting-cpu-usage-increase/#post-11835259)
 * Thanks for reply =)
    Yep, you’re right, it’s some kind of “processing time” which
   is used on shared hosting. Thought, I still used only 18% of the daily limits
   for 8.000 daily visitors and yesterday was 85%. Now I’m testing Yasr (still I
   like your plugin way more) and seems like it would be around 40% of daily script
   execution limit. What might cause the difference, maybe period of logs update(
   seems like Yasr doesn’t have real-time logs, what is fine)? And still, I dream
   about staying on my cheap shared with close to static site and your rating plugin
   =). The script was called 9.000*1.4(pages per visitor)=12.600 times, while only
   180 votes were made. Wouldn’t it make sense to regenerate page cache any time
   the post is rated, so it will be only 180 page builds instead of 12.6k script
   calls (considering the % of people who vote always low)? I mean this will make
   a great difference from other ajax rating plugins, providing better performance
   and lower resource usage.
 *  Thread Starter [catshands](https://wordpress.org/support/users/catshands/)
 * (@catshands)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/hosting-cpu-usage-increase/#post-11836415)
 * Forget about Yasr. It had problems for most users and I got only 30 votes per
   day.
 *  Plugin Support [Blaz K.](https://wordpress.org/support/users/blazk/)
 * (@blazk)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/hosting-cpu-usage-increase/#post-11837296)
 * [@catshands](https://wordpress.org/support/users/catshands/), regenerating the
   cache after the post is rated won’t do the trick 🙂 when a visitor lands on the
   page the vote count and average rating have to be updated to match the real vote
   count and real avg rating which are displayed under the widget – hence the script
   execution on every page load.
 * If you are a developer, try to rewrite javascript to do the script execution 
   only once the visitor scrolls to the rating widget. I think this would save quite
   some resources 🙂 You can use a library like waypoints [https://github.com/imakewebthings/waypoints](https://github.com/imakewebthings/waypoints)
   and then call load results function (rate-my-post\public\js\rate-my-post-public.
   js l 46-57).
 * Blaz
 *  Thread Starter [catshands](https://wordpress.org/support/users/catshands/)
 * (@catshands)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/hosting-cpu-usage-increase/#post-11837418)
 * Nah, I’m a cat – I can’t code. That’s why I don’t want to switch from shared 
   to VPS – dunno how to administer it.
    Still, your plugin is great. Thanks for
   the answers! Will stick to shared till 30k daily, then hire somebody to setup
   VPS and then I’ll install it again =)
 *  Plugin Support [Blaz K.](https://wordpress.org/support/users/blazk/)
 * (@blazk)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/hosting-cpu-usage-increase/#post-12090032)
 * [@catshands](https://wordpress.org/support/users/catshands/),
 * I don’t know if this is still of interest, but in version 2.10.0 (just released)
   the plugin no longer uses ajax on page load. This should solve the problem 🙂
 * Note: It still works with caching plugins but this is handled differently now
   🙂
 * Regards,
    Blaz
    -  This reply was modified 6 years, 7 months ago by [Blaz K.](https://wordpress.org/support/users/blazk/).

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Hosting CPU usage increase’ is closed to new replies.

 * ![](https://ps.w.org/rate-my-post/assets/icon-128x128.png?rev=2045796)
 * [Rate My Post - Star Rating Plugin by FeedbackWP](https://wordpress.org/plugins/rate-my-post/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/rate-my-post/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/rate-my-post/)
 * [Active Topics](https://wordpress.org/support/plugin/rate-my-post/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/rate-my-post/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/rate-my-post/reviews/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [cpu](https://wordpress.org/support/topic-tag/cpu/)

 * 6 replies
 * 2 participants
 * Last reply from: [Blaz K.](https://wordpress.org/support/users/blazk/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/hosting-cpu-usage-increase/#post-12090032)
 * Status: resolved