Look into using GitLab CI runner caches for pre-commit jobs
pre-commit jobs repeatedly initialise Python, npm, etc environments. This can cause jobs to take a long time.
GitLab CI supports persistent caches for CI jobs.
Look to see if pre-commit jobs can make use of the caches.