fix(spx-gui): stabilize debug console under heavy logging with ring buffer#2933
fix(spx-gui): stabilize debug console under heavy logging with ring buffer#2933nighca merged 11 commits intogoplus:devfrom
Conversation
…figurable max size and stable IDs.(goplus#2812)
…rove performance with large logs.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the debug console's stability and performance, particularly when dealing with a large volume of logs. By optimizing how logs are stored and rendered, the console now operates much more efficiently, providing a smoother user experience without compromising existing functionality or output order. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Pull request overview
This PR targets debug console stability/performance under high-volume runtime logging by bounding retained outputs with a ring buffer and reducing DOM work via basic list virtualization in the console panel.
Changes:
- Replace unbounded
outputsarray trimming with a bounded ring buffer inRuntime, adding stable per-output ids and configurable max retention. - Add a “Max logs” selector (500/1000/2000) and minimal virtualization (window + overscan + spacer rows) to
ConsolePanel. - Update runtime output append call sites to use the new
RuntimeOutputInputtype.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| spx-gui/src/components/editor/runtime.ts | Implements ring-buffer-backed outputs, stable ids, and configurable retention. |
| spx-gui/src/components/editor/runtime.test.ts | Adds unit tests for retention, ordering, ids, and change event emission. |
| spx-gui/src/components/editor/preview/EditorPreview.vue | Adjusts output append typing to match the new runtime API. |
| spx-gui/src/components/editor/panels/ConsolePanel.vue | Adds max-log selection UI and virtualized rendering with spacers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Good architectural direction — the ring buffer design is clean and the test coverage is solid. A few issues need addressing before merge:
|
There was a problem hiding this comment.
Code Review
This pull request introduces significant performance improvements to the debug console by implementing a ring buffer for log storage and virtualized rendering for the log list. The changes are well-implemented and include corresponding unit tests for the new ring buffer logic. My review includes a few suggestions for further improvement: enhancing the virtualization to handle variable-height log entries for a smoother user experience, optimizing the scroll event handling for better rendering performance, and simplifying a helper method for improved code maintainability.
…or the maximum number of outputs.
…le panel virtualization.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…nd reactive tick, and reduce default max outputs.
|
/gemini review |
|
@CORCTON Thanks for the trigger request. This repository currently enforces member-only triggers, and your account does not have repository membership access, so xgopilot cannot run for this request. To proceed, you can:
|
There was a problem hiding this comment.
Code Review
This pull request introduces a ring buffer to manage debug console logs, which is a great improvement for performance under heavy logging, and includes a new feature allowing users to select the log limit. No vulnerabilities were found in the provided code changes. I have one suggestion regarding the ring buffer's resizing logic to further optimize performance.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…tly clear the output cache.
|
/gemini review |
|
@CORCTON Thanks for the trigger request. This repository currently enforces member-only triggers, and your account does not have repository membership access, so xgopilot cannot run for this request. To proceed, you can:
|
There was a problem hiding this comment.
Code Review
This pull request introduces a significant performance improvement for the debug console by replacing an inefficient array-based logging mechanism with a ring buffer. This change effectively addresses performance issues under heavy logging. The implementation in runtime.ts is robust, incorporating a ring buffer, caching, and throttled updates for efficient UI rendering. Additionally, a new UI control has been added to allow users to configure the maximum number of log entries, and comprehensive unit tests have been included to validate the new logic. The changes are well-executed and significantly enhance the editor's stability. I have one minor suggestion to improve code conciseness.
…array manipulation in `resetOutputs`.
…as a throttled snapshot
…utilizing requestAnimationFrame with a setTimeout fallback.
…ng it to a default value.
…use `requestAnimationFrame`
This PR improves editor debug-console performance under heavy runtime logging by replacing the previous push + splice(0, …) trimming path with a bounded ring buffer (default 500, runtime-selectable 200/500/1000) while preserving ordered output semantics and existing UX (including bottom-sticky behavior); benchmark results show major gains in the write path (average speedups: x52.29 at 100k logs/max=1000, x78.73 at 400k/max=1000, x106.41 at 1M/max=1000, x148.65 at 400k/max=2000), with tests and lint passing.
close: #2812