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

⚡️Fixes small perf issues #749

Merged
merged 4 commits into from
Mar 31, 2025
Merged

⚡️Fixes small perf issues #749

merged 4 commits into from
Mar 31, 2025

Conversation

AntoLC
Copy link
Collaborator

@AntoLC AntoLC commented Mar 17, 2025

Purpose

Fixes after investigate about potential performance issues.

Proposal

  • ♻️(frontend) improve useSaveDoc hook
  • ♻️(frontend) replace useModal hook
  • ⚡️(frontend) improve heading store
  • 🚨(frontend) block button when creating doc

Sorry, something went wrong.

@AntoLC AntoLC added enhancement New feature or request frontend labels Mar 17, 2025
@AntoLC AntoLC self-assigned this Mar 17, 2025
@AntoLC AntoLC force-pushed the fix/search-perf-issue branch from 9a1b728 to 87a6d3a Compare March 17, 2025 16:18
@AntoLC AntoLC requested a review from PanchoutNathan March 17, 2025 17:22
AntoLC added 4 commits March 31, 2025 11:08
- add tests for useSaveDoc hook
- simplify hooks states
- reduce useEffect calls

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
useModal hook does not use useCallback for its
methods that creates useless rerenders.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Reset headings only when the headers are not
equal to the previous ones. It will prevent
unnecessary rerenders.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
When the user clicks on the button to create a new doc,
the button is disabled to prevent multiple clicks.
Multiple clicks on the button could create multiple docs
and create a error about duplicated paths.
@AntoLC AntoLC force-pushed the fix/search-perf-issue branch from 87a6d3a to 24adde5 Compare March 31, 2025 09:15
@AntoLC AntoLC merged commit 3881930 into main Mar 31, 2025
20 checks passed
@AntoLC AntoLC deleted the fix/search-perf-issue branch March 31, 2025 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants