Need to delete 30 million flags using "Remove Flaggings" in the Module Uninstall page. The delete is very slow and frequent out of memory errors are displayed.
Create a large number of flags. Use "Remove Flaggings" in the Module Uninstall page to remove the flags
Each flag entity delete calls hook flag\_entity\_predelete and then it finds the related flag entity in the storage and deletes it. This step is unnecessary when a flagging entity is deleted. Add a condition to check before proceeding the find the related entities.
NIL
NIL
NIL
NIL