Fix performance regressions and remove dead code#103
Draft
Conversation
- Fix previousTime.current not updated after dispatch in Composition.tsx (reduces Redux dispatches by ~73% during playback) - Move fps declaration before useEffect for readability - Clean up unused imports in Composition.tsx - Split useAppSelector in VideoTimeline.tsx to select individual fields instead of entire state (prevents re-renders on unrelated state changes) - Remove dead code in FfmpegRender.tsx: shadowed wroteFiles variable and unused parallel file loading (files were being loaded twice) - Replace debug console.log with toast.error in FfmpegRender.tsx Co-authored-by: Godzilla675 <131464726+Godzilla675@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Improve some functionality and performance
Fix performance regressions and remove dead code
Feb 13, 2026
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.
Several performance issues and dead code paths identified across the video editor frontend.
Composition: fix runaway Redux dispatches
previousTime.currentwas never updated after dispatchingsetCurrentTime, so the threshold check always passed after the first crossing — dispatching on every frame (~30/s instead of only on meaningful changes).Also moved
fpsdeclaration aboveuseEffect(was referenced before declaration) and removed 6 unused imports.VideoTimeline: prevent unnecessary re-renders
Split
useAppSelector((state) => state.projectState)into individual field selectors. The component was re-rendering on everycurrentTimechange (30fps) despite only needingmediaFiles,activeElement,activeElementIndex, andtimelineZoom.FfmpegRender: remove double file loading + dead code
Promise.allloaded every media file into FFmpeg, but the results were never used — the loop below re-loaded them individually viawroteFilescache. Removed the unused parallel load.wroteFilesdeclaration (outer one was dead).console.log('No media files to render')withtoast.error()for user visibility.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.