Skip to content

Bulk editing posts is painfully slow #519

@ivptr

Description

@ivptr

Confirmation

  • My issue isn't already found on the issue tracker.
  • I have replicated my issue using the latest version of the plugin and it is still present.

WordPress version

6.2.2

Cloudflare-WordPress version

4.12.2

PHP version

8.0

Expected result

Clear cache for all posts in a single API call.

Actual result

Clearing cache using dozens of API calls.

Steps to reproduce

  1. Visit /wp-admin/edit.php
  2. Select several posts from the list using the checkboxes on the left.
  3. Select Edit from the Bulk Actions drop-down menu and click the Apply button.
  4. Change any field, e.g. make posts Sticky
  5. Click Update

Additional factoids

CF\WordPress\Hooks::purgeCacheOnPostStatusChange function takes 2-3 seconds.

So when bulk editing 10 posts, updating takes 20-30 seconds, because there are 10 API calls involved.

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions