forked from tari-project/universe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: fix startup re-renders (tari-project#1485)
Description --- Motivation and Context --- - memoised our app & setup components - removed unnecessary `useEffects` where possible - split out the setters for `setupProgress` data so we can check if the data from the BE has in fact changed before setting the item (this caused a ton of re-renders in the `SetupProgress` components (and subsequently all it's children and parents before memo-ising) How Has This Been Tested? --- locally with `react-devtools` profiling, and mac activity monitor. bot on esme and nextnet. **profile from `main` as of when tari-project#1487 was merged**: [main_1487_profiling-data.07-02-2025.13-52-24.json](https://github.com/user-attachments/files/18706584/main_1487_profiling-data.07-02-2025.13-52-24.json) **profile from this branch, up to date with `main` (at the same point as above with tari-project#1487):** [startup_mem-uptodate-profiling-data.07-02-2025.14-00-56.json](https://github.com/user-attachments/files/18706590/startup_mem-uptodate-profiling-data.07-02-2025.14-00-56.json) --- **all the `SetupProgress` renders on `main`**: https://github.com/user-attachments/assets/74cd9008-138f-4b32-a00e-a803a98e1539 **all the `SetupProgress` renders on here after :D**: https://github.com/user-attachments/assets/93618d0e-acbe-42e3-b63e-ee3b73a3d1cc --- | before (on main) | after | | :---: | :---: | | <img width="1840" alt="frame 1 render" src="https://github.com/user-attachments/assets/1ed60d8c-98e3-4bc7-9542-a0e21eb1a7e5" /> | <img width="1840" alt="frame 1 renders" src="https://github.com/user-attachments/assets/130cfc0f-3473-4fdc-b29d-519ed6879fd3" /> | | <img width="1840" alt="frame 1 render2" src="https://github.com/user-attachments/assets/88ca3d2b-9db5-4d3f-9e16-1e3d7c79b78b" /> | <img width="1840" alt="frame1 renders2" src="https://github.com/user-attachments/assets/a72c36c4-fe01-42cf-8b24-3db0a489f62e" /> | | <img width="1728" alt="infonav renders " src="https://github.com/user-attachments/assets/1cc8520f-9e38-4909-9a7b-c002f7297d69" /> | <img width="1728" alt="infonav renders" src="https://github.com/user-attachments/assets/16992644-60c2-406f-bc00-2ad1bc2ffe41" /> | | <img width="1728" alt="mainview renders" src="https://github.com/user-attachments/assets/9ed214f5-78ff-4349-8790-d2f6c3452681" /> | <img width="1728" alt="mainview renders" src="https://github.com/user-attachments/assets/61fb299a-d122-45ed-aa3c-a561a72dbd72" /> | <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a configuration variable to reliably display the application version. - **Style** - Updated canvas opacity and refined the progress indicator for a smoother visual experience. - **Refactor** - Optimized numerous UI components and dialogs with memoization and consolidated state logic for enhanced performance and clarity. - **Chores** - Improved logging and timeout management to boost overall stability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information
1 parent
b366257
commit d0ba475
Showing
30 changed files
with
280 additions
and
234 deletions.
There are no files selected for viewing
This file contains 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 @@ | ||
VITE_TARI_UNIVERSE_VERSION=$npm_package_version |
This file contains 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 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 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 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 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 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 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 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 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 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.