-
Notifications
You must be signed in to change notification settings - Fork 47
Enhance UI performance for MQTT #118
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
Open
danielmeza
wants to merge
16
commits into
chkr1011:main
Choose a base branch
from
danielmeza:merge-high-troutput
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
bf60310
Enhance TLS configuration and error handling in MqttClientService
danielmeza d540f63
Enhance TLS options in MqttClientService for improved security handling
danielmeza 98c78cb
Merge branch 'chkr1011:main' into main
danielmeza 2eda8b3
Add high-throughput guide for handling 8K+ MQTT messages in desktop U…
danielmeza a9df2f3
Enhance PacketInspector with null-safe data access and improve UI fee…
danielmeza 4f4c455
Refactor MessageProcessingOptions to remove TrimBatchSize and adjust …
danielmeza 84d6216
Refactor message processing settings and improve UI responsiveness by…
danielmeza 679d786
Merge branch 'main' into merge-high-troutput
danielmeza 9b0a95d
Enable developer tools in debug mode with Microsoft logger integration
danielmeza 5a57dcd
Enhance logging for message processing and packet inspection in MqttC…
danielmeza 5bef6e1
Potential fix for pull request finding
danielmeza e1bef51
Refactor MqttClientService to improve connection handling and detach …
danielmeza 722bbe7
Refactor connection handling in MainView and MainViewModel; update to…
danielmeza 90a209e
Handle unobserved task exceptions by setting them as observed and dis…
danielmeza f902490
Optimize packet number handling using Interlocked for thread safety
danielmeza 6c77af8
Add documentation for Mosquitto bug: UNSUBACK packets dropped when ou…
danielmeza File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using DynamicData; | ||
|
|
||
| namespace mqttMultimeter.Extensions; | ||
|
|
||
| public static class CollectionTrimExtensions | ||
| { | ||
| /// <summary> | ||
| /// Adds items and trims the oldest entries inside a single | ||
| /// <see cref="SourceList{T}.Edit"/> changeset so the UI receives one update. | ||
| /// Removes exactly the overflow (count − max) so the list stays at | ||
| /// <paramref name="maxItems"/> rather than dropping a fixed batch size. | ||
| /// </summary> | ||
| public static void AddRangeAndTrim<T>( | ||
| this SourceList<T> source, | ||
| IList<T> items, | ||
| int maxItems) where T : notnull | ||
| { | ||
| source.Edit(list => | ||
| { | ||
| list.AddRange(items); | ||
|
|
||
| var overflow = list.Count - maxItems; | ||
| if (overflow > 0) | ||
| { | ||
| list.RemoveRange(0, overflow); | ||
| } | ||
| }); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Diagnostics; | ||
| using System.Reactive.Concurrency; | ||
| using Microsoft.Extensions.Logging; | ||
| using ReactiveUI; | ||
|
|
||
| namespace mqttMultimeter.Logging; | ||
|
|
||
| public class LogObserverExceptionHandler(ILogger logger) : IObserver<Exception> | ||
| { | ||
| public void OnNext(Exception value) | ||
| { | ||
| if (Debugger.IsAttached) | ||
| Debugger.Break(); | ||
|
|
||
| logger.LogError(value, "MyRxHandler Error"); | ||
| RxSchedulers.MainThreadScheduler.Schedule(() => | ||
| { | ||
| throw value; | ||
| }); | ||
| } | ||
|
|
||
| public void OnError(Exception error) | ||
| { | ||
| if (Debugger.IsAttached) | ||
| Debugger.Break(); | ||
|
|
||
| logger.LogError(error, "MyRxHandler OnError"); | ||
|
|
||
| RxSchedulers.MainThreadScheduler.Schedule(() => | ||
| { | ||
| throw error; | ||
| }); | ||
| } | ||
|
|
||
| public void OnCompleted() | ||
| { | ||
| if (Debugger.IsAttached) | ||
| Debugger.Break(); | ||
| RxSchedulers.MainThreadScheduler.Schedule(() => | ||
| { | ||
| throw new NotImplementedException(); | ||
| }); | ||
|
Comment on lines
+41
to
+44
|
||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Fiexed