-
Notifications
You must be signed in to change notification settings - Fork 155
Optimize websocket data sending to the UI #913
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
base: main
Are you sure you want to change the base?
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
bd50741 to
7ca05bc
Compare
…ation and API responses.
6fbf80c to
9454ea1
Compare
User description
Fixes an issue where adding more jobs to RDTClient causes the per-second UI update via websocket to get very very large as it sends far more data, and null fields, over the channel.
With about 100 download jobs, I was getting about 35MiB/sec of transfer, with this change that's now 200KiB/sec.
This change implements a DTO object to minimal represent data needed for the UI and transfer only that.
PR Type
Enhancement
Description
Replace Torrent model with TorrentDto to reduce websocket data transfer
Eliminate null fields and unnecessary data from API responses
Implement DTO mapping in RemoteService and TorrentsController endpoints
Update logging and database paths to relative paths in configuration
Diagram Walkthrough
File Walkthrough
RemoteService.cs
Implement TorrentDto mapping in websocket updatesserver/RdtClient.Service/Services/RemoteService.cs
RdtClient.Data.Models.InternalnamespaceDownloadDto mapping
sending via websocket
significantly
TorrentsController.cs
Convert controller endpoints to return TorrentDto objectsserver/RdtClient.Web/Controllers/TorrentsController.cs
IListtoIListTorrenttoTorrentDtoendpoints
appsettings.json
Update configuration paths to relative locationsserver/RdtClient.Web/appsettings.json
/data/db/rdtclient.logto./rdtclient.log/data/db/rdtclient.dbto./rdtclient.db