Skip to content

perf(core): Shorten bootup for all instance types #15856

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

Merged
merged 1 commit into from
May 30, 2025
Merged

Conversation

ivov
Copy link
Contributor

@ivov ivov commented May 30, 2025

Summary

Anything that is imported in an oclif command ends up loaded in-memory for other commands as well.

Until we move away from this setup, we have to lazyload as much as possible in commands, e.g. SecurityAuditService which takes up ~20% of bootup time.

Capture 2025-05-30 at 10 29 43@2x

Related Linear tickets, Github issues, and Community forum posts

n/a

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@ivov ivov requested a review from Cadiac May 30, 2025 08:31
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

cubic reviewed 2 files and found no issues. Review PR in cubic.dev.

Copy link
Contributor

@Cadiac Cadiac left a comment

Choose a reason for hiding this comment

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

🚀 nice find and easy gain with the dynamic import. I love that you're profiling our startup!

@shortstacked
Copy link
Contributor

Workflow Test Results 📊 🔴 2 Failed, ⚠️ 2 Warnings, 👍 79 Successful out of 83 total workflows.

Detail: Workflows failing: 237: Workflow contains 1 deleted data. View full workflow run

Tested Ref: b6403e15848fb79dc62535514698cf6a1c79031e by @Cadiac

❌ Failed Tests (2)

Workflow ID Workflow Name Reason
237 BasicLLMChain:AzureChat Workflow contains 1 deleted data.
258 Agent:auto-fix:openai Workflow contains 2 deleted data.

⚠️ Warnings (2)

Workflow ID Workflow Name Reason
53 ConvertKit:CustomField:create getAll update delete... Workflow contains new data that previously did not exist.
257 Agent:auto-fix:anthropic Workflow contains new data that previously did not exist.

@ivov ivov changed the title perf(core): Speed up bootup for all instance types perf(core): Shorten bootup for all instance types May 30, 2025
Copy link
Contributor

✅ All Cypress E2E specs passed

@ivov ivov merged commit 73c9a52 into master May 30, 2025
46 of 47 checks passed
@ivov ivov deleted the speed-up-bootup branch May 30, 2025 08:58
Copy link

codecov bot commented May 30, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/cli/src/commands/audit.ts 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

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.

3 participants