Skip to content

perf(rendering): share the project config across frame uniforms - #2483

Open
yashranaway wants to merge 3 commits into
CapSoftware:mainfrom
yashranaway:perf/share-project-across-frame-uniforms
Open

yashranaway wants to merge 3 commits into
CapSoftware:mainfrom
yashranaway:perf/share-project-across-frame-uniforms

Conversation

@yashranaway

@yashranaway yashranaway commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

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.

RetriggerView in GreptileConfidence Score: 4/5

Update the three cap-verify constructor calls before merging so the integration tests can compile.

Findings

  1. P1 Verification tests cannot compile ▶
Fix with agent prompt
### Issue 1
crates/rendering/src/lib.rs:3920
`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.

Summary

Frames now share ProjectConfiguration through an Arc. Active style overrides still receive their own copy.

  • Rendered frames share the project settings unless a style override changes them.

Reviews (3) · Last reviewed commit: "perf(rendering): pass the shared project..." · Reviewed by Greptile

Comment thread apps/desktop/src-tauri/src/export.rs Outdated
Comment thread crates/rendering/src/lib.rs Outdated
@yashranaway

Copy link
Copy Markdown
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
yashranaway force-pushed the perf/share-project-across-frame-uniforms branch from f9dd0a7 to e442f88 Compare October 18, 2026 18:46
@yashranaway

Copy link
Copy Markdown
Contributor Author

@greptileai review

@vercel

vercel Bot commented Oct 18, 2026

Copy link
Copy Markdown
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>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant