Due to GitLab's API design the CLI makes a lot of separate queries, which slows down the execution time. This is typically at least O(n ²) time due to nested loops combined with general slowness as API calls to an external service are performed each time.
This can most probably not be fixed via algorithmic changes, but requires parallelization. We may tackle this using Python's asyncio module. See the recording of Michael Kennedy's webinar for a good intro.