-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
fix for issue #189 slow startup #194
Conversation
📝 Walkthrough📝 WalkthroughWalkthroughThe pull request introduces modifications to the Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
src/Consolonia.Core/Infrastructure/InputLessDefaultNetConsole.cs (1)
161-169
: Efficient emoji detection implementation with room for improvementThe implementation is clever and efficient, testing emoji support during initialization. However, consider adding error handling:
- (int left, int top) = Console.GetCursorPosition(); - WriteText( - $"{Esc.Foreground(Colors.Transparent)}{Esc.Background(Colors.Transparent)}{TestEmoji}"); - (int left2, _) = Console.GetCursorPosition(); - _supportEmoji = left2 - left == 2; - Console.SetCursorPosition(left, top); + try + { + (int left, int top) = Console.GetCursorPosition(); + WriteText( + $"{Esc.Foreground(Colors.Transparent)}{Esc.Background(Colors.Transparent)}{TestEmoji}"); + (int left2, _) = Console.GetCursorPosition(); + _supportEmoji = left2 - left == 2; + Console.SetCursorPosition(left, top); + } + catch (IOException) + { + // Fallback if cursor operations fail + _supportEmoji = false; + }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
src/Consolonia.Core/Infrastructure/InputLessDefaultNetConsole.cs
(3 hunks)
🔇 Additional comments (2)
src/Consolonia.Core/Infrastructure/InputLessDefaultNetConsole.cs (2)
50-50
: Performance improvement: Cached emoji support detection
Good optimization. Changed from repeated detection to cached result, which helps reduce startup time and improves runtime performance.
161-169
: Verify startup time improvement
The changes look promising for improving startup time. Let's verify the claimed improvement from 10s to 1s.
Co-authored-by: <[email protected]>
This is less goofy and now it starts in <1s instead of 10seconds. #189