I'm trying this out on a dev version of a site. I have thousands of revisions on this site that need to be cleaned up and removed, but the cron run is taking quite a long time. It looks like the module currently runs a node_load() on each and every revision that is being deleted and an individual database DELETE query on each. I wonder if there's any way we could speed up this process so that an initial cleanup of a large site wouldn't result in such a huge single initial cron run. Possibly it could be chunked out and done in pieces until the cleanup is complete... more like the build in Drupal Search module builds its index.

Comments

attheshow’s picture

Ok, after further analysis of the code, it looks like whatever the administrator sets the "Number of Revisions per Page" setting to will be used during cron runs. So if the admin chooses "100" per page, not only does that show 100 revisions per page on the listing page, but also limits the cron run such that it will only delete a maximum of 100 items. It's a little strange that this isn't broken out into a different setting in the .admin.inc file.

attheshow’s picture

Status: Active » Patch (to be ported)
StatusFileSize
new962 bytes

I've attached a patch for the admin form that explains that the limit will also be used by the module to control the number of revisions that are deleted on cron runs. Hopefully this will help other admins to understand this since it isn't obvious. (Patch attached to this issue.)

attheshow’s picture

Title: Slow With Thousands of Revisions » Explanation of Cron Limit Needed on Admin Form
Component: Performance » User interface
Category: support » feature

Adjusting title of issue to match previous patch.

shaneonabike’s picture

+1 this wasn't clear I thought the items per page referred to if you enabled this module to take over the revisions page.

danepowell’s picture

I agree an explanation is needed. I also think the explanation should point out the massive memory requirements, so this needs to be set reasonably (~1000 revision max).

I opened a separate related issue: #2091159: Reduce memory requirement, allow more frequent deletions

adriancid’s picture

Issue summary: View changes
Status: Patch (to be ported) » Closed (outdated)