Sample CodeQL matrix build for java and javascript
To decrease your wall clock time inside a single pipeline with multiple languages, you might consider running jobs in parallel using a matrix strategy.
This strategy will require you to have multiple available parallel jobs available to take advantage of the concurrent work.
This can be achieved with organization level configuration along with both Microsoft-hosted and self-hosted agents.
Also note that each Visual Studio Enterprise subscriber gets one self-hosted parallel job as a subscriber benefit!
Sample CodeQL matrix build for java and javascript
See file: ghazdo-matrix.yml
Before (9m wall clock time)
After (4m wall clock time)