perf-test: enhance first-load and optimize bundle size#112
Draft
perf-test: enhance first-load and optimize bundle size#112
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
04802a9 to
61b5082
Compare
Optimize initial load performance - Removed redundant players (dotLottie & Skottie) to reduce initialization overhead on first load - Removed unused libraries to reduce bundle size - Replaced `setTimeout` with `requestAnimationFrame` for tighter post-frame callback timing
ede193b to
432e83d
Compare
There was a problem hiding this comment.
Pull request overview
This PR optimizes initial load performance and reduces bundle size by removing redundant animation player implementations (dotLottie and Skottie) and unused dependencies. The changes consolidate on a single ThorVG-based player implementation and replace setTimeout with requestAnimationFrame for better frame-timing coordination.
Key Changes:
- Removed 5 unused dependencies:
@lottiefiles/dotlottie-react,@lottiefiles/react-lottie-player,canvaskit-wasm,uuid, andi - Replaced multiple player implementations with a single ThorVG player supporting both Software and WebGPU rendering
- Improved code maintainability by introducing TypeScript enums and constants
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| perf-test/package.json | Removed 5 unused dependencies and their corresponding type definitions |
| perf-test/components/SkottiePlayer/index.tsx | Deleted entire Skottie player component that used canvaskit-wasm |
| perf-test/app/page.tsx | Refactored to use only ThorVG player, introduced TypeScript types, replaced setTimeout with requestAnimationFrame, and simplified state management |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Author
|
partly duplicated: #201 |
65ddc80 to
0edd052
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Optimize initial load performance
setTimeoutwithrequestAnimationFramefor tighter post-frame callback timing