Skip to content
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

fix(desktop): fix loss messages issue #1835

Merged
merged 4 commits into from
Dec 13, 2024
Merged

fix(desktop): fix loss messages issue #1835

merged 4 commits into from
Dec 13, 2024

Conversation

ysfscream
Copy link
Member

@ysfscream ysfscream commented Dec 12, 2024

PR Checklist

If you have any questions, you can refer to the Contributing Guide

What is the current behavior?

Currently, there are several issues with message handling in MQTTX:

  1. Messages are lost when sending at high rates
  2. Message rendering becomes out of order at high frequencies
  3. Unable to load new messages when scrolling up/down
  4. UI performance degrades significantly with high message rates
  5. No optimization for different message rates scenarios

Issue Number: #1614 #1770

What is the new behavior?

This PR introduces several improvements to message handling and rendering:

  1. Message Integrity

    • Fixed message loss during high-frequency publishing
    • Ensured correct message sequencing
    • Implemented reliable message storage and retrieval
  2. Scroll and Load Optimization

    • Fixed issues with loading previous/next messages while scrolling
    • Improved scroll performance
    • Added proper scroll position maintenance
  3. Dynamic Buffer System

    • Added automatic buffer mode for high message rates (>30 msgs/sec)
    • Implemented batch rendering for better performance
    • Smooth transitions between normal and buffer modes
    • No message loss during mode switches
  4. Performance Improvements

    • Reduced UI rendering pressure
    • Better memory usage
    • Improved overall responsiveness
    • Optimized message processing pipeline

Does this PR introduce a breaking change?

  • Yes
  • No

Specific Instructions

  1. Testing high-frequency scenarios:

    • Test with different message rates (5/s, 20/s, 50/s)
    • Verify message integrity during rate changes
    • Check scroll behavior with large message volumes
  2. Key improvements to verify:

    • No message loss at any rate
    • Correct message ordering
    • Smooth scrolling experience
    • UI responsiveness under load
    • Buffer mode activation/deactivation

@ysfscream ysfscream requested a review from Red-Asuka December 12, 2024 08:12
@ysfscream ysfscream changed the title feat(desktop): add connection select when left list hide fix(desktop): fix loss messages issue Dec 12, 2024
@ysfscream ysfscream added enhancement New feature or request fix Fix bug or issues desktop MQTTX Desktop labels Dec 13, 2024
@ysfscream ysfscream added this to the v1.11.1 milestone Dec 13, 2024
@ysfscream ysfscream marked this pull request as ready for review December 13, 2024 07:17
@Red-Asuka Red-Asuka merged commit 2094d27 into main Dec 13, 2024
2 checks passed
@Red-Asuka Red-Asuka deleted the ysf/desktop branch December 13, 2024 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
desktop MQTTX Desktop enhancement New feature or request fix Fix bug or issues
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants