Skip to content

Feature/faster block catalog reset#41

Merged
jeffpaul merged 6 commits intodevelopfrom
feature/faster-block-catalog-reset
Feb 19, 2024
Merged

Feature/faster block catalog reset#41
jeffpaul merged 6 commits intodevelopfrom
feature/faster-block-catalog-reset

Conversation

@dsawardekar
Copy link
Copy Markdown
Collaborator

@dsawardekar dsawardekar commented Jan 16, 2024

Description of the Change

This PR significantly improves performance of the delete index operation. On a large site with thousands of posts it can taken an hour or to delete the index, because we iterate over each term one at a time. Instead this PR refactors the delete index logic to use direct database queries.

How to test the Change

  • Run the PHPUnit tests, they should pass without any errors or warnings
  • Test delete index performance
    • Test with wp block-catalog delete-index
    • Test with the WP-Admin Settings page > Delete Index button
faster_catalog_reset.webm

Changelog Entry

Changed - Significantly improved performance of block catalog reset on larger WordPress installations

Credits

Props @dsawardekar

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@dsawardekar dsawardekar marked this pull request as ready for review January 16, 2024 14:40
@dsawardekar dsawardekar requested a review from a team as a code owner January 16, 2024 14:40
@dsawardekar dsawardekar requested review from Sidsector9 and removed request for a team January 16, 2024 14:40
@jeffpaul jeffpaul added this to the 1.6.0 milestone Jan 16, 2024
Sidsector9
Sidsector9 previously approved these changes Jan 22, 2024
@jeffpaul
Copy link
Copy Markdown
Member

@Sidsector9 @dsawardekar looks like an ESLint run failure, potentially affect from merging in #43

@Sidsector9 Sidsector9 force-pushed the feature/faster-block-catalog-reset branch from 1f04da0 to 0aaf780 Compare February 19, 2024 12:24
@jeffpaul jeffpaul merged commit 5ad7f20 into develop Feb 19, 2024
@jeffpaul jeffpaul deleted the feature/faster-block-catalog-reset branch February 19, 2024 16:39
@dkotter dkotter modified the milestones: 1.6.0, 1.5.4 Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants