Skip to content

Comments

perf-test: enhance first-load and optimize bundle size#112

Draft
tinyjin wants to merge 1 commit intomainfrom
jinny/perf-test-opt
Draft

perf-test: enhance first-load and optimize bundle size#112
tinyjin wants to merge 1 commit intomainfrom
jinny/perf-test-opt

Conversation

@tinyjin
Copy link
Member

@tinyjin tinyjin commented Jun 14, 2025

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

@tinyjin tinyjin requested a review from hermet June 14, 2025 06:40
@tinyjin tinyjin self-assigned this Jun 14, 2025
@tinyjin tinyjin added the enhancement Improve features label Jun 14, 2025
@vercel
Copy link

vercel bot commented Jun 14, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
thorvg-perf-test Ready Ready Preview Comment Dec 11, 2025 6:53am

@tinyjin tinyjin marked this pull request as draft September 26, 2025 08:14
@hermet hermet force-pushed the main branch 3 times, most recently from 04802a9 to 61b5082 Compare November 8, 2025 18:18
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
@tinyjin tinyjin force-pushed the jinny/perf-test-opt branch from ede193b to 432e83d Compare December 11, 2025 06:52
@tinyjin tinyjin marked this pull request as ready for review December 11, 2025 06:53
Copilot AI review requested due to automatic review settings December 11, 2025 06:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and i
  • 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.

@tinyjin
Copy link
Member Author

tinyjin commented Jan 26, 2026

partly duplicated: #201

@tinyjin tinyjin marked this pull request as draft January 27, 2026 10:46
@hermet hermet force-pushed the main branch 2 times, most recently from 65ddc80 to 0edd052 Compare January 27, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improve features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant