Running it after every persist is an antipattern actually. Ideally, you should run it once at the end of the request.
I would not put it in a postDispatch handler, because that means it will run after every request, and that is going to be costly performance wise on, for example, list pages, where you list entities with many relations, because Doctrine will have to examine many entities for changes.
Put it at the end of actions that modify data.