Skip to content
This repository was archived by the owner on Dec 18, 2025. It is now read-only.

Possible mem perf improvements#655

Merged
pingu2k4 merged 4 commits into
devfrom
feature/improve-mem-perf
Feb 4, 2025
Merged

Possible mem perf improvements#655
pingu2k4 merged 4 commits into
devfrom
feature/improve-mem-perf

Conversation

@pingu2k4
Copy link
Copy Markdown
Contributor

@pingu2k4 pingu2k4 commented Feb 4, 2025

Changes

  • Possible mem perf improvements

Issue

Categorise the PR

  • feature
  • bug
  • docs
  • security
  • meta
  • patch
  • minor
  • major

Description by Korbit AI

What change is being made?

Refactor the client registration code to optimize memory usage in ServiceCollectionExtensions for both client and server contexts, including relocating repetitive client registration logic to reusable methods, and updating the SDK version.

Why are these changes being made?

These changes improve the maintainability and performance of the code by reducing duplication and enhancing memory efficiency through consolidated client registration logic. The SDK version update reflects these critical improvements.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

@pingu2k4 pingu2k4 self-assigned this Feb 4, 2025
@github-actions github-actions Bot added bug Something isn't working meta patch labels Feb 4, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 4, 2025

Test Results

3 727 tests  ±0   3 727 ✅ ±0   52s ⏱️ ±0s
    3 suites ±0       0 💤 ±0 
    3 files   ±0       0 ❌ ±0 

Results for commit dc02015. ± Comparison against base commit f4fbea6.

This pull request removes 339 and adds 339 tests. Note that renamed tests count towards both.
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ CreateUserJwt_ShouldReturnSuccess_WhenApiCallSucceeds(request: CreateUserJwtRequest { Duration = 1800, SessionId = "679bd65a0003d71f54fc", UserId = "679bd65a0003dc8af144", ValidationContext = None })
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ CreateUserJwt_ShouldReturnSuccess_WhenApiCallSucceeds(request: CreateUserJwtRequest { Duration = null, SessionId = null, UserId = "679bd65a0003cc0d3a65", ValidationContext = None })
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ ListUserLogs_ShouldReturnSuccess_WhenApiCallSucceeds(request: ListUserLogsRequest { Queries = null, UserId = "679bd65a0003e84ea724", ValidationContext = None })
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ ListUserLogs_ShouldReturnSuccess_WhenApiCallSucceeds(request: ListUserLogsRequest { Queries = null, UserId = "679bd65a0003ec85a88a", ValidationContext = None })
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ ListUserTargets_ShouldReturnSuccess_WhenApiCallSucceeds(request: ListUserTargetsRequest { Queries = null, UserId = "679bd65a0003e4a29ef1", ValidationContext = None })
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ ListUserTargets_ShouldReturnSuccess_WhenApiCallSucceeds(request: ListUserTargetsRequest { Queries = null, UserId = "679bd65a0003e869e00d", ValidationContext = None })
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ UpdateUserLabels_ShouldReturnSuccess_WhenApiCallSucceeds(request: UpdateUserLabelsRequest { Labels = ["label1", "label2"], UserId = "679bd65a0003edbb9f84", ValidationContext = None })
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ UpdateUserLabels_ShouldReturnSuccess_WhenApiCallSucceeds(request: UpdateUserLabelsRequest { Labels = ["label3", "label4"], UserId = "679bd65a0003e29c987c", ValidationContext = None })
PinguApps.Appwrite.Shared.Tests.Requests.Account.CreatePushTargetRequestTests ‑ IsValid_WithInvalidData_ReturnsFalse(request: CreatePushTargetRequest { Identifier = "", ProviderId = "provider123", TargetId = "679bd658003da7e4db46", ValidationContext = None })
PinguApps.Appwrite.Shared.Tests.Requests.Account.CreatePushTargetRequestTests ‑ IsValid_WithInvalidData_ReturnsFalse(request: CreatePushTargetRequest { Identifier = null, ProviderId = "provider123", TargetId = "679bd658003da5ce8070", ValidationContext = None })
…
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ CreateUserJwt_ShouldReturnSuccess_WhenApiCallSucceeds(request: CreateUserJwtRequest { Duration = 1800, SessionId = "67a1881e0005ea66df34", UserId = "67a1881e0005ea086254", ValidationContext = None })
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ CreateUserJwt_ShouldReturnSuccess_WhenApiCallSucceeds(request: CreateUserJwtRequest { Duration = null, SessionId = null, UserId = "67a1881e0005d623fea0", ValidationContext = None })
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ ListUserLogs_ShouldReturnSuccess_WhenApiCallSucceeds(request: ListUserLogsRequest { Queries = null, UserId = "67a1881e0005e5f7d20f", ValidationContext = None })
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ ListUserLogs_ShouldReturnSuccess_WhenApiCallSucceeds(request: ListUserLogsRequest { Queries = null, UserId = "67a1881e0005e6fa447b", ValidationContext = None })
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ ListUserTargets_ShouldReturnSuccess_WhenApiCallSucceeds(request: ListUserTargetsRequest { Queries = null, UserId = "67a1881e0005ee119da3", ValidationContext = None })
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ ListUserTargets_ShouldReturnSuccess_WhenApiCallSucceeds(request: ListUserTargetsRequest { Queries = null, UserId = "67a1881e0005ef9648fb", ValidationContext = None })
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ UpdateUserLabels_ShouldReturnSuccess_WhenApiCallSucceeds(request: UpdateUserLabelsRequest { Labels = ["label1", "label2"], UserId = "67a1881e0005e8864cdf", ValidationContext = None })
PinguApps.Appwrite.Server.Tests.Clients.Users.UsersClientTests ‑ UpdateUserLabels_ShouldReturnSuccess_WhenApiCallSucceeds(request: UpdateUserLabelsRequest { Labels = ["label3", "label4"], UserId = "67a1881e0005e8503339", ValidationContext = None })
PinguApps.Appwrite.Shared.Tests.Requests.Account.CreatePushTargetRequestTests ‑ IsValid_WithInvalidData_ReturnsFalse(request: CreatePushTargetRequest { Identifier = "", ProviderId = "provider123", TargetId = "67a1881d0007a62d2e94", ValidationContext = None })
PinguApps.Appwrite.Shared.Tests.Requests.Account.CreatePushTargetRequestTests ‑ IsValid_WithInvalidData_ReturnsFalse(request: CreatePushTargetRequest { Identifier = null, ProviderId = "provider123", TargetId = "67a1881d0007a4270848", ValidationContext = None })
…

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown

@korbit-ai korbit-ai Bot left a comment

Choose a reason for hiding this comment

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

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Fix Detected
Functionality Syntax Error in Method Call ▹ view
Performance Redundant Lazy Initialization of Singleton ▹ view
Functionality Fixed HTTP Client Timeout ▹ view

Need a new review? Comment /korbit-review on this PR and I'll review your latest changes.

Korbit Guide: Usage and Customization

Interacting with Korbit

  • You can manually ask Korbit to review your PR using the /korbit-review command in a comment at the root of your PR.
  • You can ask Korbit to generate a new PR description using the /korbit-generate-pr-description command in any comment on your PR.
  • Too many Korbit comments? I can resolve all my comment threads if you use the /korbit-resolve command in any comment on your PR.
  • Chat with Korbit on issues we post by tagging @korbit-ai in your reply.
  • Help train Korbit to improve your reviews by giving a 👍 or 👎 on the comments Korbit posts.

Customizing Korbit

  • Check out our docs on how you can make Korbit work best for you and your team.
  • Customize Korbit for your organization through the Korbit Console.

Feedback and Support

Comment thread src/PinguApps.Appwrite.Server/ServiceCollectionExtensions.cs Outdated
Comment thread src/PinguApps.Appwrite.Client/ServiceCollectionExtensions.cs
Comment thread src/PinguApps.Appwrite.Client/ServiceCollectionExtensions.cs
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 4, 2025

Code Coverage

Package Line Rate Branch Rate Complexity Health
PinguApps.Appwrite.Client 98% 98% 150
PinguApps.Appwrite.Server 98% 97% 158
PinguApps.Appwrite.Shared 100% 100% 1424
Summary 99% (3868 / 3893) 99% (745 / 749) 1732

@pingu2k4 pingu2k4 merged commit bd20487 into dev Feb 4, 2025
@korbit-ai korbit-ai Bot mentioned this pull request Feb 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working meta patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant