-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: reduce VS Code extension lag by truncating CHANGELOG #8529
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
Conversation
- Create script to generate truncated CHANGELOG (10 most recent versions) - Remove release images from VS Code CHANGELOG - Reduce CHANGELOG size from 114KB to 4.8KB (95.8% reduction) - Add link to full changelog on GitHub Fixes #8527
| for (const line of lines) { | ||
| // Check if this is a version header | ||
| if (line.startsWith("## [")) { | ||
| versionCount++ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current logic increments versionCount for each version header and breaks when versionCount exceeds maxVersions. This causes versionCount to be one more than the number of versions actually included in the truncated file. If the note is intended to show the total number of releases in the full changelog, consider pre-counting the headers; otherwise, adjust the note for clarity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Self-review initiated: auditing my own code like a deterministic rubber duck judging its creator.
| truncatedLines.push("---") | ||
| truncatedLines.push("") | ||
| truncatedLines.push( | ||
| `*For the complete changelog with all ${versionCount} releases, please visit the [GitHub repository](https://github.com/RooCodeInc/Roo-Code/blob/main/CHANGELOG.md).*`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: The release count in the footer is inaccurate: versionCount increments before the break, so this often reports 11 when only 10 versions are included, and it doesn't reflect total releases. Either compute a total in a separate pass or avoid the number entirely to prevent misleading output.
| `*For the complete changelog with all ${versionCount} releases, please visit the [GitHub repository](https://github.com/RooCodeInc/Roo-Code/blob/main/CHANGELOG.md).*`, | |
| '*For the complete changelog, please visit the [GitHub repository](https://github.com/RooCodeInc/Roo-Code/blob/main/CHANGELOG.md).*', |
| let changelogGenerated = false | ||
| try { | ||
| console.log("[extension] Generating truncated CHANGELOG for VS Code...") | ||
| execSync("node ../scripts/generate-vscode-changelog.js", { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3: execSync runs on every build (including watch/dev), adding overhead and blocking the event loop during iterative builds. Consider gating generation behind the existing production flag to avoid doing this work outside release packaging.
Description
This PR attempts to address Issue #8527 where the VS Code extension becomes extremely laggy when viewing the extension details page.
Problem
When users click on the Roo extension in VS Code's Extensions view, the interface becomes very slow with noticeable delays in scrolling, clicking buttons, and typing. The issue was caused by the large CHANGELOG.md file (114KB with 2305 lines) that includes release images.
Solution
Results
Testing
Fixes #8527
Feedback and guidance are welcome!
Important
Truncates VS Code extension's
CHANGELOG.mdto improve performance, using a script to generate a shortened version and modifying the build process to incorporate it.CHANGELOG.mdto the 10 most recent releases for VS Code extension, removing images.CHANGELOG.vscode.md.esbuild.mjsto use truncated changelog during build, with fallback to original if generation fails.generate-vscode-changelog.jsto create truncated changelog, handling up to 10 versions and excluding images.esbuild.mjsto execute the changelog generation script and copy the appropriate changelog file.This description was created by
for 391582f. You can customize this summary. It will automatically update as commits are pushed.