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

perf(cu): optimize between cron messages function #774 #784

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jfrain99
Copy link
Contributor

@jfrain99 jfrain99 commented Jun 10, 2024

Closes #774
Attempt at optimization of cron messages between algorithm. While the algorithm remains O(C * T), where C is the number of cron messages and T is the number of seconds in the range, in the worst case, changes were made so that smaller optimizations can be realized. Namely, checks are now only performed on certain seconds, not each second.

It is worth noting that O(CT) is the best possible time complexity for this algorithm, as all crons will need to be checked at each interval.

@jfrain99 jfrain99 changed the title perf(cu): optimize between cron messages function #774 perf(cu): optimize between cron messages function #784 Jun 10, 2024
@jfrain99 jfrain99 force-pushed the jfrain99/optimize-between-cron-function branch from 98a9752 to 0d9138a Compare June 12, 2024 14:07
@jfrain99 jfrain99 linked an issue Jun 12, 2024 that may be closed by this pull request
@jfrain99 jfrain99 changed the title perf(cu): optimize between cron messages function #784 perf(cu): optimize between cron messages function #774 Jun 12, 2024
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.

perf(cu): optimize the Cron message generation algorithm
1 participant