cloudflare / Cloudflare-WordPress

A Cloudflare plugin for WordPress
https://www.cloudflare.com/wordpress/
BSD 3-Clause "New" or "Revised" License
215 stars 83 forks source link

Bulk editing posts is painfully slow #519

Open ivptr opened 1 year ago

ivptr commented 1 year ago

Confirmation

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

github-actions[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

ivptr commented 9 months ago

It's still the same in version 4.12.4.

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

ivptr commented 2 months ago

Having the same issue with version 4.12.8.