Skip to content

Conversation

@Gold856
Copy link
Collaborator

@Gold856 Gold856 commented Oct 31, 2025

Description

The big change here is to remove the loading SVG from the DOM and to stuff it into an <img> like before. This mostly restores the old CPU usage back down to the baseline of ~10% on my laptop. This also fixes the JSON.stringify hack used to check if the current camera settings was PlaceholderCameraSettings by using Object.freeze (this apparently allows normal equality operators to be used). This also takes CPU usage down a few extra percent. One dynamically calculated class was also removed because those are also CPU-expensive (and this instance was completely unnecessary and easy to remove. Doesn't have much impact though.)

Meta

Merge checklist:

  • Pull Request title is short, imperative summary of proposed changes
  • The description documents the what and why
  • If this PR changes behavior or adds a feature, user documentation is updated
  • If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly
  • If this PR touches configuration, this is backwards compatible with settings back to v2025.3.2
  • If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated
  • If this PR addresses a bug, a regression test for it is added

@github-actions github-actions bot added the frontend Having to do with PhotonClient and its related items label Oct 31, 2025
@samfreund
Copy link
Member

Is the goal here to optimize CPU usage on the client or the coprocessor?

@Gold856
Copy link
Collaborator Author

Gold856 commented Nov 1, 2025

On the client.

@Gold856 Gold856 marked this pull request as ready for review November 23, 2025 21:12
@Gold856 Gold856 requested a review from a team as a code owner November 23, 2025 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Having to do with PhotonClient and its related items

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants