-
Notifications
You must be signed in to change notification settings - Fork 76
perf(server): reuse SuiClient across requests #764
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
Code Review: PR #764 - Reuse SuiClient across requestsSummaryThis PR introduces a performance optimization by caching and reusing a single ✅ Strengths
🔍 Code Quality & Best PracticesGood:
🐛 Potential IssuesMinor - Documentation:
Minor - Initialization Timing:
🔒 Security ConsiderationsNo issues identified. The changes don't introduce security concerns:
⚡ Performance ConsiderationsExcellent improvement:
Note: The
🧪 Test CoverageGap identified:
Recommendations:
Example test structure: #[cfg(test)]
mod tests {
use super::*;
#[tokio::test]
async fn test_sui_client_reuse() {
// Verify multiple calls return the same client instance
}
#[tokio::test]
async fn test_sui_client_initialization_error() {
// Verify proper error handling for invalid RPC URLs
}
}📋 RecommendationsPriority: Low
Priority: Optional
✨ ConclusionThis is a well-implemented performance optimization with no critical issues. The code is clean, follows Rust best practices, and provides meaningful performance benefits. The main gap is test coverage, but the implementation itself is solid. Recommendation: Approve with optional improvements for tests and documentation. Great work! 🚀 |
|
@sb- hi please review this pr |
31ab822 to
17827b2
Compare
|
@sb- the ci of rustfmt have some error, I have fix that,please review again. thanks |
|
@sb- no merge? |
|
Please resolve the merge conflicts |
17827b2 to
d2f6fd7
Compare
a single sui_sdk::SuiClient.