Skip to content

Conversation

@zhangtony239
Copy link
Contributor

@zhangtony239 zhangtony239 commented May 24, 2025

Related GitHub Issue

Closes: #3919

Description

Make Roo Code comply with VSCode's automatic lazy loading to speed up extension startup.

Test Procedure

  • Run this version.
  • Wait Roo Code start, count the time you used.

Type of Change

  • 🐛 Bug Fix: Non-breaking change that fixes an issue.
  • New Feature: Non-breaking change that adds functionality.
  • 💥 Breaking Change: Fix or feature that would cause existing functionality to not work as expected.
  • ♻️ Refactor: Code change that neither fixes a bug nor adds a feature.
  • 💅 Style: Changes that do not affect the meaning of the code (white-space, formatting, etc.).
  • 📚 Documentation: Updates to documentation files.
  • ⚙️ Build/CI: Changes to the build process or CI configuration.
  • 🧹 Chore: Other changes that don't modify src or test files.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Code Quality:
    • My code adheres to the project's style guidelines.
    • There are no new linting errors or warnings (npm run lint).
    • All debug code (e.g., console.log) has been removed.
  • Testing:
    • New and/or updated tests have been added to cover my changes.
    • All tests pass locally (npm test).
    • The application builds successfully with my changes.
  • Branch Hygiene: My branch is up-to-date (rebased) with the main branch.
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Changeset: A changeset has been created using npm run changeset if this PR includes user-facing changes or dependency updates.
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

before after
2025-05-24.203811.mp4
2025-05-24.203309.mp4

Get in Touch

Discord: zhangtony239


Important

Remove onStartupFinished activation event from package.json to improve Roo Code extension startup speed.

  • Behavior:
    • Removed onStartupFinished from activationEvents in package.json to comply with VSCode's lazy loading and improve extension startup speed.

This description was created by Ellipsis for 90da4c3. You can customize this summary. It will automatically update as commits are pushed.

@mrubens
Copy link
Collaborator

mrubens commented May 24, 2025

Looks like these were added in #367... can't remember why

@mrubens
Copy link
Collaborator

mrubens commented May 24, 2025

I don't really understand why this would speed up loading though

@zhangtony239
Copy link
Contributor Author

My test shows that if the current folder has very few files, it loads extremely fast. But when opening large folders like the Roo Code repo itself, the speed difference becomes immediately noticeable. And Roo thread was not busy, but vscode itself.
image

@zhangtony239
Copy link
Contributor Author

Based on the side effects of onStartupFinished that Roo explained to me, I suspect it might be because Roo Code’s priority too high, causing other necessary VSCode threads to not get enough execution priority. This kind of 'hogging resources without making progress' ends up dragging down the checkpoint of Roo Code‘s done.

@mrubens
Copy link
Collaborator

mrubens commented May 24, 2025

Interesting, thanks! Think we can get rid of onLanguage too? My quick reading about it makes it sound like it’s an invalid option anyway.

@zhangtony239
Copy link
Contributor Author

Let me test that…

@zhangtony239
Copy link
Contributor Author

Wait a sec… maybe you are right. Wait, oh you're right — this actually isn't the issue. I just checked the settings, and there was an experimental code indexing toggle enabled, which better explains the behavior I described earlier. Keeping onStartupFinished does seem a bit faster after all.

image

Sorry for the noise — next time I’ll make sure to rebase and do a dry run first 😣

@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap May 24, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap May 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Long wait when init Roo Code

2 participants