Skip to content

refactor(flame_3d): Optimize allocation time in shaders#3881

Merged
wolfenrain merged 3 commits intomainfrom
refactor(flame_3d)-optimize-allocation-time-in-shaders
Mar 25, 2026
Merged

refactor(flame_3d): Optimize allocation time in shaders#3881
wolfenrain merged 3 commits intomainfrom
refactor(flame_3d)-optimize-allocation-time-in-shaders

Conversation

@wolfenrain
Copy link
Copy Markdown
Contributor

Description

We were unnecessarily computing byte buffers in the shaders, making it quite a hot path for allocations. Because buffer sizes are based on the uniforms we can easily pre-calculate the actual byte buffer ahead of time and just update based off ranges

Checklist

  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

@wolfenrain wolfenrain requested a review from luanpotter March 25, 2026 11:50
Copy link
Copy Markdown
Member

@luanpotter luanpotter left a comment

Choose a reason for hiding this comment

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

LGTM

@wolfenrain wolfenrain merged commit 043d6e8 into main Mar 25, 2026
6 checks passed
@wolfenrain wolfenrain deleted the refactor(flame_3d)-optimize-allocation-time-in-shaders branch March 25, 2026 19:28
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.

2 participants