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 the Cron message generation algorithm #774

Open
TillaTheHun0 opened this issue Jun 6, 2024 · 0 comments · May be fixed by #784
Open

perf(cu): optimize the Cron message generation algorithm #774

TillaTheHun0 opened this issue Jun 6, 2024 · 0 comments · May be fixed by #784
Assignees
Labels
cu ao Compute Unit enhancement New feature or request hold

Comments

@TillaTheHun0
Copy link
Member

Background

The CU must generate Cron Messages, according to the Crons present on the ao Process.

The current code for doing so can be found here with an associated test to assert the results correctness

Problem

The CU Cron algorithm currently does a "tick" across every second in an interval, generating time-based and block-based cron. This approach is very inefficient -- an O(n^2) algorithm.

We need to come up with a more efficient algorithm.

Developer Notes

The test asserts the correctness of the cron generated by the function, and the function self-contained. In this regard, you can use TDD to assert the correctness of any new implementation.

@TillaTheHun0 TillaTheHun0 added enhancement New feature or request cu ao Compute Unit labels Jun 6, 2024
@TillaTheHun0 TillaTheHun0 changed the title perf(cu): optimize the Cron algorithm perf(cu): optimize the Cron message generation algorithm Jun 6, 2024
@jfrain99 jfrain99 self-assigned this Jun 6, 2024
@jfrain99 jfrain99 linked a pull request Jun 12, 2024 that will close this issue
@TillaTheHun0 TillaTheHun0 assigned TillaTheHun0 and unassigned jfrain99 Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cu ao Compute Unit enhancement New feature or request hold
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants