This filter can be used for changing the number of deleted files.
Changelog
Since 7.1.1 version
Parameters
$limit (type: int) – the number of files that will be deleted each time.
Usage
add_filter("wpdiscuz_delete_unattached_files_limit", function ($limit) { return 40; }, 10);