Conversation
joseblas
approved these changes
Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We have a single monorepo with over 50 multibranch pipelines. We noticed that when a webhook is received (e.g. PR opened, new commit pushed) the multibranch PR projects get updated sequentially, taking 3-4 seconds per pipeline. This means that the last pipeline starts running with several minutes of delay.
This was caused by the SCM event listener applying each event to every matching project one at a time. Applying an event means a blocking
SCMSource.fetchcall: a round trip to the SCM (GitHub in our case).This change keeps the cheap part (working out which projects match the event) serial, but runs the per-project fetches concurrently on a shared thread pool. The pool defaults to 10 threads, matching the
SCMEventdispatcher pool.With this change, all of our pipelines start running within seconds.
Related issue: #797 but it describes the same sequential stuff happening in OrganizationFolders
Testing done
Added a test asserting that one event matching 3 projects is applied to all of them concurrently. It fails with the previous sequential setup, or when the pool size is forced to 1.
Submitter checklist