Updates and optimisation for the pattern bank production
See merge request atlas/athena!11813
Former-commit-id: c7bc526b8c1d618733bbd8068ee6bef1b8e511b5