Skip to content

Conversation

@SirYwell
Copy link
Member

@SirYwell SirYwell commented Aug 3, 2025

Overview

Description

When writing changes, we already have copies of the get and set data. That means we don't need (and shouldn't) copy it again. This reduces memory allocations in the history by around 90%.

Submitter Checklist

  • Make sure you are opening from a topic branch (/feature/fix/docs/ branch (right side)) and not your main branch.
  • Ensure that the pull request title represents the desired changelog entry.
  • New public fields and methods are annotated with @since TODO.
  • I read and followed the contribution guidelines.

@SirYwell SirYwell requested a review from a team as a code owner August 3, 2025 12:31
@dordsor21
Copy link
Member

Which command(s) was this tested with?

@SirYwell
Copy link
Member Author

SirYwell commented Aug 3, 2025

Which command(s) was this tested with?

Only //air, but bot copying at this point must be safe, otherwise the history would be broken already

@SirYwell
Copy link
Member Author

SirYwell commented Aug 4, 2025

I did some more testing (height brush, //replace with several masks) and didn't find any issues beyond what's already broken.
For example the angle mask breaks history already, but that is unrelated to copying the array.

@dordsor21 dordsor21 requested a review from a team August 8, 2025 12:28
@NotMyFault NotMyFault merged commit a085a03 into main Aug 8, 2025
9 checks passed
@NotMyFault NotMyFault deleted the perf/history-copying branch August 8, 2025 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants