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

Speed up Trick::ScheduledJobQueue::push #1694

Merged
merged 6 commits into from
Jul 23, 2024

Conversation

iamthad
Copy link
Contributor

@iamthad iamthad commented Apr 16, 2024

Fixes #1693

}
JobData ** new_list = (JobData **)realloc(list, (list_size + 1) * sizeof(JobData *)) ;
if (!new_list) {
abort();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This could be replaced with some other logic, but the old code wasn't handling allocation failure at all.

@coveralls
Copy link

coveralls commented Apr 16, 2024

Coverage Status

coverage: 55.836% (-0.06%) from 55.896%
when pulling 9985458 on iamthad:hotfix/job-queue-push
into a9aa708 on nasa:master.

@sharmeye sharmeye reopened this Jul 23, 2024
@sharmeye sharmeye merged commit 92b0168 into nasa:master Jul 23, 2024
21 checks passed
@sharmeye
Copy link
Contributor

We checked this out and are satisfied it's working as expected. Thank you for the contribution, we appreciate the help.

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.

Trick::ScheduledJobQueue::push has O(n) complexity
3 participants