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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

⚡️Fixes small perf issues #749

wants to merge 4 commits into from

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

@AntoLC AntoLC added enhancement New feature or request frontend labels Mar 17, 2025
@AntoLC AntoLC self-assigned this Mar 17, 2025
AntoLC added 4 commits March 17, 2025 17:18
- add tests for useSaveDoc hook
- simplify hooks states
- reduce useEffect calls
useModal hook does not use useCallback for its
methods that creates useless rerenders.
Reset headings only when the headers are not
equal to the previous ones. It will prevent
unnecessary rerenders.
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 9a1b728 to 87a6d3a Compare March 17, 2025 16:18
@AntoLC AntoLC requested a review from PanchoutNathan March 17, 2025 17:22
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.

1 participant