Skip to content

DEV: Reduce unnecessary UI updates when posts change #33864

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
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

megothss
Copy link
Contributor

@megothss megothss commented Jul 25, 2025

This PR refines how posts are updated in the post stream and store service to minimize unnecessary UI re-renders.

In the store service, only changed properties are set on existing records, preventing redundant updates and improving Glimmer performance.

megothss added 3 commits July 25, 2025 14:01
Replaced promise chaining with async/await syntax to improve clarity and handle asynchronous logic. Added JSDoc comments to document method parameters and behavior.

Updated logic to conditionally preserve cooked HTML and ensure the topic reference is correctly updated.
Updated property assignment logic in `store` to only update changed values, preventing unnecessary rerenders in Glimmer.
Removed unnecessary resolved promise and streamlined the return behavior for cases where `postId` is not provided.
@megothss megothss changed the title DEV: Optimize re-renders when updating posts DEV: Reduce unnecessary UI updates when posts change Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants