Details
Description
PermissionHook has in memory state in modified and deleted maps. In case of repository migration which is implemented as a large commit this can consume quite a bit of memory. In one of the migration it was taking ~1 GB of memory.
In a commit involving multiple commit hooks once PermissionHook has done the work it can clear that state so that memory is not held up untill all the hooks are applied. Specially as IndexingHook takes long time and also has some memory requirements