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

chore: decrease devel startup/reconciliation time #1278

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

worstell
Copy link
Contributor

fixes #1010

@worstell worstell requested a review from a team as a code owner April 16, 2024 16:48
@worstell worstell requested review from wesbillman and removed request for a team April 16, 2024 16:48
@alecthomas alecthomas mentioned this pull request Apr 16, 2024
@worstell worstell force-pushed the worstell/20240416-decrease-devel-startup-time branch from 44b3b4f to 20d78b8 Compare April 16, 2024 16:49
Comment on lines 213 to 221
func (s *Service) scheduleDevelopmentTasks() {
s.tasks.Parallel(backoff.Backoff{Min: time.Second, Max: time.Second}, s.syncRoutes)
s.tasks.Parallel(backoff.Backoff{Min: time.Second * 2, Max: time.Second * 2}, s.heartbeatController)
s.tasks.Parallel(backoff.Backoff{Min: time.Second, Max: time.Second}, s.updateControllersList)
s.tasks.Singleton(backoff.Backoff{Min: time.Second, Max: time.Second}, s.reapStaleRunners)
s.tasks.Singleton(backoff.Backoff{Min: time.Second, Max: time.Second}, s.releaseExpiredReservations)
s.tasks.Singleton(backoff.Backoff{Min: time.Second, Max: time.Second}, s.reconcileDeployments)
s.tasks.Singleton(backoff.Backoff{Min: time.Second, Max: time.Second}, s.reconcileRunners)
s.tasks.Parallel(backoff.Backoff{Min: time.Second, Max: time.Second}, s.reapStaleControllers)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice! This will be much better :)

Is there a way to refactor this so only the Max time value is changed? vs. having to duplicate all these tasks? My concern would be that we might add a task to dev and forget to add it to prod or visa versa

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point - will refactor so we don't need to maintain separate lists

@worstell worstell force-pushed the worstell/20240416-decrease-devel-startup-time branch from 20d78b8 to 1d84771 Compare April 16, 2024 17:18
@worstell worstell force-pushed the worstell/20240416-decrease-devel-startup-time branch from 1d84771 to 327d47a Compare April 16, 2024 17:32
@worstell worstell requested a review from wesbillman April 16, 2024 17:33
@worstell worstell merged commit b0fd7d3 into main Apr 16, 2024
11 checks passed
@worstell worstell deleted the worstell/20240416-decrease-devel-startup-time branch April 16, 2024 17: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.

Decrease ftl serve startup and reconciliation time
2 participants