Skip to content

Conversation

kcooney
Copy link
Contributor

@kcooney kcooney commented Sep 1, 2025

If there are more than 10 queued results, PhotonCamera.getAllUnreadResults() would resize two arrays at least once each.

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 v2024.3.1
  • 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

If there are more than 10 queued results, PhotonCamera.getAllUnreadResults()
would resize two arrays at least once each.
@kcooney kcooney requested a review from a team as a code owner September 1, 2025 06:12
@github-actions github-actions bot added the photonlib Things related to the PhotonVision library label Sep 1, 2025
Copy link
Collaborator

@Gold856 Gold856 left a comment

Choose a reason for hiding this comment

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

Love reducing allocations. I wonder if there's any other places we could do that.

@kcooney
Copy link
Contributor Author

kcooney commented Sep 1, 2025

Love reducing allocations. I wonder if there's any other places we could do that.

I found a bunch. Sent out #2080

@Gold856 Gold856 merged commit 3300b90 into PhotonVision:main Sep 2, 2025
42 checks passed
@kcooney kcooney deleted the get-arraylist-initial-size branch September 2, 2025 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

photonlib Things related to the PhotonVision library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants