verbb / wishlist

A Craft CMS plugin for wishlists for your users to save things to
Other
11 stars 12 forks source link

Batch purge orphaned items and inactive lists for large lists sets #114

Closed a-am closed 1 year ago

a-am commented 1 year ago

What are you trying to do?

We have over 4 million lists & 3 million list items, and when trying to use built in purge console actions we get memory errors. This appears to be due to the fact the purge functions load all elements at once into an array.

What's your proposed solution?

To help memory load if you could batch purge orphaned lists & list items.

Additional context

No response

engram-design commented 1 year ago

Added a batch size of 200 for each of these commands, which should hopefully help. To get this early, change your verbb/wishlist requirement in composer.json to:

"require": {
  "verbb/wishlist": "dev-craft-4 as 2.0.2",
  "...": "..."
}

Then run composer update.

a-am commented 1 year ago

@engram-design could this also be updated for the latest Craft 3 Version. We are working our way up to Craft 4. Please and Thank you?

engram-design commented 1 year ago

To get this early, change your verbb/wishlist requirement in composer.json to:

"require": {
  "verbb/wishlist": "dev-craft-3 as 1.4.14",
  "...": "..."
}

Then run composer update.

engram-design commented 1 year ago

Added in 2.0.3 and 1.4.15