Hi,
I could not find 10.4.x compatible patch for commit 3cf003db
so I made my own, I hope someone else finds this useful.
If the edits to the src/NodeRevisionDeleteBatchInterface.php
are an issue, then the MR could be altered to create a custom method for the batch queue which processes the $nids_chunk
. This new queueChunk($nids_chunk)
method could be used when the count of processed nids_to_add
gets larger then eg 1000? The new method could be added here -> https://git.drupalcode.org/project/node_revision_delete/-/merge_requests...
I did some memory debugging with this helper: https://blog.riff.org/2016_08_04_how_to_display_time_and_memory_use_for_drush_commands
When the 587k node ids are already in the queue and the $nids_in_queue
is at largest
Memory:
Initial: malloc = 21.60M real = 22.25M
Final: malloc = 22.58M (+ 0.99M) real = 49.25M (+27.00M)
Peak: malloc = 80.03M (+58.43M) real = 96.25M (+74.00M)
Yes, the memory usage peaks. About the api changes: I did not consider the breaking changes when editing the BatchInterface.
Hi,
My merge request does two things: The nodeExistsInQueue check is replaced with array of all node ids and a isset check, this method cuts the run time from tens of minutes to seconds. Second thing is the batch creation uses chunks of node ids that are processed. The chuck size can be set via the queue_chunk_size config. I also looked into updating drush queue adding with 520000 nodes, the drush (time drush node-revision-delete:queue
) adding takes 1min. I still have to commit my fix for the drush command.
I could not find any reason why the sidebar icon has been changed? To my eye that looks odd. Can I get some arguments why this has been done?
https://git.drupalcode.org/project/gin/-/merge_requests/420/diffs#6b572a...
Hi,
Here is fresh version of the patch against 8.x-2.0-alpha5. I think I had marked the patch against the wrong branch.
This patch was my first attempt to address the issue.
Nice work! Tested this with D10.1 and with 2.0.0-alpha3, no more console log error!
I tested this patch with vanilla D10.1 this seems works as Tuuuukka reported. In some setups the diff.plugin.yml config changes are exported only after saving the /admin/config/content/diff/fields form but I guess this is the way the diff configs are updated / detected. After saving the settings form the patch works as expected.
I ran these these with PHP 8.1.22 & vanilla D10.1.5 and they are working fine!