Skip to content

Driver Cleanup 2: Electric Boogaloo#80

Open
ImSapphire wants to merge 19 commits into
mainfrom
sapphire/cleanup
Open

Driver Cleanup 2: Electric Boogaloo#80
ImSapphire wants to merge 19 commits into
mainfrom
sapphire/cleanup

Conversation

@ImSapphire
Copy link
Copy Markdown
Member

@ImSapphire ImSapphire commented May 8, 2026

No description provided.

@ImSapphire ImSapphire changed the title Sapphire/cleanup Driver Cleanup 2: Electric Boogaloo May 8, 2026
@ImSapphire ImSapphire force-pushed the sapphire/enforce-clang-format branch from 2bdba0c to 6752c9c Compare May 8, 2026 19:10
Base automatically changed from sapphire/enforce-clang-format to main May 8, 2026 20:46
Copy link
Copy Markdown
Member

@kitlith kitlith left a comment

Choose a reason for hiding this comment

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

Sorry for the delay.

This overall looks very good, but I have one concern due to the introduction of fixed size arrays that needs to be fixed. I'll mark that one very clearly. The rest are optional and opinion based. I'll be happy to hit "Approve" after that's been fixed.

Comment thread src/bridge/BridgeTransport.cpp Outdated
Comment thread src/bridge/BridgeTransport.cpp Outdated
Comment on lines +154 to +156
char write_buf[4096];
send_buf_.Pop(write_buf, available);
connection_handle_->write(write_buf, static_cast<unsigned int>(available));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

a thought that doesn't need to be implemented right now: can we write (potentially twice?) directly from the circular buffer instead of first copying to a linear buffer?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i think even more ideally that this would be a vectored write instead of up to two writes, but uvw doesn't expose libuv's vectored write capabilities atm.

Comment thread src/bridge/BridgeTransport.cpp Outdated
Comment thread src/bridge/BridgeTransport.cpp Outdated
Comment thread src/VRDriver.cpp Outdated
@ImSapphire ImSapphire requested a review from kitlith May 17, 2026 02:30
Copy link
Copy Markdown
Member

@kitlith kitlith left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants