Performance: Try refactoring get_hooked_blocks() to check impact
#5399
+89
−85
get_hooked_blocks() to check impact
#5399