Simpleads campaigns CPU usage skyrockets after lots of ad impressions

Created on 30 December 2012, almost 12 years ago
Updated 9 June 2023, over 1 year ago

This happens regardless of whether you're counting campaigns by ad impressions or not. The issue is in the function _simpleads_campaigns_complete. On my site, I've got half a million ad impressions, and the table was being counted every time an ad loaded, which was causing the ad to take 6+ seconds to show up on the screen, not to mention pegging the CPU. For people who are running ads by date and not impression, this count is unnecessary, so I moved the counts into an if{} block, which fixed the issue for me specifically. That being said, this will continue to be an issue for sites counting campaigns by impressions and clicks, so for a real fix, I'd recommend creating a summary table that stores impression counts and updating it from cron.

πŸ› Bug report
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States BartK

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024