The MyCoReCLI supports bulk commands like import all objects in folder x or delete all objects of type y.
Every bulk command is splitted into smaller commands 'delete all objects of type y' gets 'delete object y1', 'delete object y2', 'delete object y3'.
Every command has a transaction and maybe one or more operations which trigger a chain of eventhandlers.
So the command 'delete all objects of type y' can easily trigger thousands or millions of transactions and eventhandler calls.
Some operations could be more optimized if the evenhandler chain would also handle bulk events. E.g.:
1. When sending mails instead of 50 mails to one user there could be send 1 mail with 50 objects to one user.
2. When uploading a file, the mets eventhandler checks if there is a mets file and checks the file is present in the mets file. Instead of open read and parsing the mets file 50 times it can be opend just one time.
3. When deleting objects every object is deleted one by one in solr.