View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
5804 | Composr | stats | public | 2024-07-24 17:02 | 2025-01-05 02:21 |
Reporter | PDStig | Assigned To | Chris Graham | ||
Priority | high | Severity | minor | ||
Status | resolved | Resolution | fixed | ||
Product Version | 11.beta1 | ||||
Summary | 5804: Views hook is painfully slow if it was blocked for some time | ||||
Description | The views stats hook is very slow when having to process a lot of records (e.g. it was locked out for a while due to an error). We may need to optimise it further. On a dedicated server with a calculate_performance_score() of 990,000 uniqid+md5 operations per second... this hook takes about 6 seconds on average for every 1,000 records to process in the main processing loop. On a relatively quiet site averaging 125 views per day, this translates to 13,000+ records for a 2-month period. The entire hook took 176 seconds to finish. | ||||
Tags | Roadmap: v11 | ||||
Attach Tags | |||||
Time estimation (hours) | |||||
Sponsorship open | |||||
|
Automated message: This issue was created using the Report Issue Wizard on the Composr homesite. |
|
Bumping up to a minor bug. This is causing issues in composr.app . Even though stats are calculated daily, this particular hook is still very slow. Composr.app gets a lot of traffic but not what I'd call "excessive", so the amount of time (60+ seconds sometimes) it takes is concerning. |
|
I optimised statistics to hopefully reduce the amount of time necessary to calculate: - Scheduler for stats now runs once every hour instead of day to spread out resource use when calculating - In addition to only looking back up to 31 days ago, the scheduler will only process stats for up to one day at a time per execution - Flat calculations will be skipped if calculating for a previous day and not today (since flat hooks are usually overall stats and not time based) - I fixed a few hooks which were not factoring in start and end time like they should have |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-07-24 17:02 | PDStig | Assigned To | => Chris Graham |
2024-07-24 17:02 | PDStig | Status | Not Assigned => Assigned |
2024-07-24 17:03 | PDStig | Description Updated | |
2024-07-24 17:03 | PDStig | Description Updated | |
2024-07-24 20:58 | Chris Graham | Tag Attached: Roadmap: v11 | |
2025-01-04 23:36 | PDStig | Severity | Trivial Bug => Minor Bug |
2025-01-04 23:36 | PDStig | Note Added: 0009766 | |
2025-01-04 23:37 | PDStig | Note Edited: 0009766 | |
2025-01-05 02:21 | PDStig | Status | Assigned => Resolved |
2025-01-05 02:21 | PDStig | Resolution | open => fixed |
2025-01-05 02:21 | PDStig | Note Added: 0009770 |