OndroMih opened a new pull request, #9305: URL: https://github.com/apache/netbeans/pull/9305
Defer branch merge status computation in Select Revision dialog When the Select Revision dialog is opened from Cherry Pick, the branchMergeWith field is set, causing getCommonAncestor() to be called for every branch (120+) before nodes are shown. This blocks the single-threaded RepositoryPanel RequestProcessor for ~10 seconds. Move the getCommonAncestor loop out of refreshBranches() into a separate background task (computeMergeStatuses) that runs after nodes are already displayed. Nodes initially show with null merge status and are updated incrementally as results arrive via updateBranchMergeStatus/ updateMergeStatus. When a branch node is selected and its merge status is still pending, trigger an immediate single-branch lookup. ### To test: On Netbeans repository, select Cherry Pick dialog, then click Select Revision. Old behavior: It takes a few seconds until the branches and tags are displayed (because the merge status is being computed) New behavior: Branches and tags are displayed immediately, with [merge ? ] behind the name, merge status is computed in the background, and then [merge ? ] is either removed (not merged) or replaced with [merged]. ### PR approval and merge checklist: 1. [ ] Was this PR [correctly labeled](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=240884239#PRsandYouAreviewerGuide-PRtriggeredCIJobs(conditionalCIpipeline)), did the right tests run? When did they run? 2. [ ] Is this PR [squashed](https://cwiki.apache.org/confluence/display/NETBEANS/git%3A+squash+and+merge)? 3. [ ] Are author name / email address correct? Are [co-authors](https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors#creating-co-authored-commits-on-the-command-line) correctly listed? Do the commit messages need updates? 3. [ ] Does the PR title and description still fit after the Nth iteration? Is the description sufficient to appear in the release notes? If this PR targets the delivery branch: [don't merge](https://cwiki.apache.org/confluence/display/NETBEANS/Pull+requests+for+delivery). ([full wiki article](https://cwiki.apache.org/confluence/display/NETBEANS/PRs+and+You+-+A+reviewer+Guide)) </details> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
