View Issue Details

IDProjectCategoryView StatusLast Update
5804Composrstatspublic2025-01-05 02:21
ReporterPDStig Assigned ToChris Graham  
PriorityhighSeverityminor 
Status resolvedResolutionfixed 
Product Version11.beta1 
Summary5804: Views hook is painfully slow if it was blocked for some time
DescriptionThe 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.
TagsRoadmap: v11
Attach Tags
Time estimation (hours)
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Activities

admin

2024-07-24 17:02

administrator   ~8903

Automated message: This issue was created using the Report Issue Wizard on the Composr homesite.

PDStig

2025-01-04 23:36

administrator   ~9766

Last edited: 2025-01-04 23:37

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.

PDStig

2025-01-05 02:21

administrator   ~9770

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

Issue History

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