Repository navigation
perf(rendering): share the project config across frame uniforms - #2483
Open
yashranaway wants to merge 3 commits into
Open
yashranaway wants to merge 3 commits into
yashranaway wants to merge 3 commits into
Conversation
Contributor
Author
|
@greptileai review |
ProjectUniforms owned a full ProjectConfiguration, so every rendered frame deep-cloned the project, including every caption word twice, once in captions and once in the timeline's caption segments. Playback, scrubbing and export all build uniforms per frame, and export can clone again per render attempt. ProjectUniforms now holds an Arc<ProjectConfiguration>. The constructors take the caller's Arc and only allocate a new config when a style segment overrides it at that frame. Export builds one Arc per export, and playback keeps one until the project changes.
…nstructor The Tauri export previews and screenshot editor wrapped a fresh clone of the project for every set of uniforms. They now move their owned config into one Arc. benchmark_project_uniforms builds its zoom timeline and frame inputs outside the timed region and times ProjectUniforms::new alone.
yashranaway
force-pushed
the
perf/share-project-across-frame-uniforms
branch
from
October 18, 2026 18:46
f9dd0a7 to
e442f88
Compare
Contributor
Author
|
@greptileai review |
Contributor
|
@yashranaway is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
| pub fn new( | ||
| constants: &RenderVideoConstants, | ||
| project: &ProjectConfiguration, | ||
| project: &Arc<ProjectConfiguration>, |
Contributor
There was a problem hiding this comment.
Verification tests cannot compile
ProjectUniforms::new now requires &Arc<ProjectConfiguration>, but Player::frame in crates/verify/tests/common/mod.rs still passes &self.config, whose type is &ProjectConfiguration, at three call sites. Several integration tests include this module, so the cap-verify tests no longer compile. Store the player's config in an Arc and reuse it for these calls.
Prompt To Fix With AI
This is a comment left during a code review.
Path: crates/rendering/src/lib.rs
Line: 3920
Comment:
**Verification tests cannot compile**
`ProjectUniforms::new` now requires `&Arc<ProjectConfiguration>`, but `Player::frame` in `crates/verify/tests/common/mod.rs` still passes `&self.config`, whose type is `&ProjectConfiguration`, at three call sites. Several integration tests include this module, so the `cap-verify` tests no longer compile. Store the player's config in an `Arc` and reuse it for these calls.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.This branch has not been deployed
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.
every rendered frame deep copied the whole project config, transcript included, and threw it away after rendering. with a 30 minute transcript that's over a millisecond per frame during playback, scrubbing and export.
now frames share one copy and only make their own while a style override is active, so building a frame's settings stays under a microsecond however long the transcript is. exports make the shared copy once, so nothing calling them changes.
Update the three
cap-verifyconstructor calls before merging so the integration tests can compile.Findings
Fix with agent prompt
Summary
Frames now share
ProjectConfigurationthrough anArc. Active style overrides still receive their own copy.Reviews (3) · Last reviewed commit: "perf(rendering): pass the shared project..." · Reviewed by Greptile