Skip to content

Conversation

Erarndt
Copy link
Contributor

@Erarndt Erarndt commented Jun 10, 2025

Fixes #

Context

Changes Made

Testing

Notes

@Copilot Copilot AI review requested due to automatic review settings June 10, 2025 18:01
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR streamlines the scheduling process by directly enumerating unscheduled requests instead of first copying them into a new list.

  • Eliminates the intermediate List allocation for unscheduled requests
  • Directly iterates over _schedulingData.UnscheduledRequestsWhichCanBeScheduled in the scheduler component
Comments suppressed due to low confidence (1)

src/Build/BackEnd/Components/Scheduler/Scheduler.cs:994

  • Directly iterating over _schedulingData.UnscheduledRequestsWhichCanBeScheduled removes the defensive copy previously used to avoid potential issues if the collection is modified during iteration. Please verify that the collection remains unmodified during enumeration or consider retaining a copy if concurrent modifications are possible.
foreach (SchedulableRequest request in _schedulingData.UnscheduledRequestsWhichCanBeScheduled)

@SimaTian SimaTian merged commit 074cf71 into dotnet:main Jun 19, 2025
10 checks passed
@Erarndt Erarndt deleted the dev/erarndt/listInitialSize branch June 19, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants