Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary deepcopy #3796

Merged
merged 3 commits into from
Jul 19, 2024
Merged

Remove unnecessary deepcopy #3796

merged 3 commits into from
Jul 19, 2024

Conversation

JamesMurkin
Copy link
Contributor

This deepcopy isn't actually doing anything useful and is quite slow

  • In tests where the scheduler was only evicting/rescheduling jobs, it was 10% of the scheduling round

It is no longer needed, it was originally added as the scheduler would modify the job it was scheduling. This is no longer the case and that is now added to the JobSchedulingContext instead

I've added a very brief test to confirm it no longer modifies the original jobs scheduling details

  • Ideally we'd check the job hasn't changed at all - but it isn't completely straight forward

This deepcopy isn't actually doing anything useful and is quite slow
 - In tests where the scheduler was only evicting/rescheduling jobs, it was 10% of the scheduling round

It is no longer needed, it was originally added as the scheduler would modify the job it was scheduling. This is no longer the case and that is now added to the JobSchedulingContext instead

I've added a very brief test to confirm it no longer modifies the original jobs scheduling details
 - Ideally we'd check the job hasn't changed at all - but it isn't completely straight forward

Signed-off-by: JamesMurkin <[email protected]>
@JamesMurkin JamesMurkin marked this pull request as ready for review July 18, 2024 16:07
@JamesMurkin JamesMurkin enabled auto-merge (squash) July 19, 2024 08:10
@JamesMurkin JamesMurkin merged commit c4dcebb into master Jul 19, 2024
20 checks passed
@JamesMurkin JamesMurkin deleted the remove_deepcopy branch July 19, 2024 08:16
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.

2 participants