Skip to content

Provide buffer size in ShpRemasteredSprite.#21556

Merged
PunkPun merged 1 commit into
OpenRA:bleedfrom
RoosterDragon:meta-size
Sep 18, 2024
Merged

Provide buffer size in ShpRemasteredSprite.#21556
PunkPun merged 1 commit into
OpenRA:bleedfrom
RoosterDragon:meta-size

Conversation

@RoosterDragon
Copy link
Copy Markdown
Member

As the expected size is quite small here, providing an explicit buffer size helps as otherwise default buffers for 1024 characters are allocated by the StreamReader which must be cleaned up by the GC afterwards. These smaller buffers still need cleanup but waste less memory.


Small PR aiming to assist the TDHD mod.

As the expected size is quite small here, providing an explicit buffer size helps as otherwise default buffers for 1024 characters are allocated by the StreamReader which must be cleaned up by the GC afterwards. These smaller buffers still need cleanup but waste less memory.
Copy link
Copy Markdown
Member

@pchote pchote left a comment

Choose a reason for hiding this comment

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

Makes sense, but not tested.

@RoosterDragon
Copy link
Copy Markdown
Member Author

I did give this a run in TDHD, so can confirm no regressions there.

Copy link
Copy Markdown
Member

@PunkPun PunkPun left a comment

Choose a reason for hiding this comment

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

OK

@PunkPun PunkPun merged commit 87aa7c1 into OpenRA:bleed Sep 18, 2024
@PunkPun
Copy link
Copy Markdown
Member

PunkPun commented Sep 18, 2024

changelog

@RoosterDragon RoosterDragon deleted the meta-size branch September 18, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants