Automattic / Automattic/pushpress

Batch ping requests, instead of creating individual cron tasks for each site.

Open
#14 0 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
PHP
Stars
15
Forks
10
PR merge metrics
No merged PRs in 30d

Description

Currently a new cron entry is added for each subscriber to notify them of changes. This can cause a problem when you're using an external cron provider, such as https://github.com/humanmade/Cavalcade which we do on WordPress.org

As a result, the cron table ends up with many jobs that all run within their own processes all requested at the same second. This causes a bit of a backlog to happen if there's a lot of subscribers.

Potentially, It would make sense to instead have these processed as a batch cron task, processing the first 5 entries, then scheduling another job to process items 6...n items, which processes the first 5-10, etc. Perhaps processing as many of them as it can within `max_execution_time / 2` seconds, then queueing another process, etc.

This is a low-priority enhancement, that may benefit larger sites with many hundreds of subscribers. WordPress.org maxes out at about 100 subscribers per site currently I believe.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.