Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance of R8Loader. #21357

Merged
merged 1 commit into from Mar 9, 2024
Merged

Conversation

RoosterDragon
Copy link
Member

The repeated small stream reads of ReadUInt16 generate a lot of overhead. Instead, consume the data in a single ReadBytes call and then unpack within the same buffer.

Reduces the CPU used by the R8Loader.Frame constructor when opening the d2k mod from 7.1% to 1.5%.

The repeated small stream reads of ReadUInt16 generate a lot of overhead. Instead, consume the data in a single ReadBytes call and then unpack within the same buffer.
Copy link
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.

LGTM

@PunkPun PunkPun merged commit 519db10 into OpenRA:bleed Mar 9, 2024
3 checks passed
@PunkPun
Copy link
Member

PunkPun commented Mar 9, 2024

Changelog

@RoosterDragon RoosterDragon deleted the r8-perf branch March 10, 2024 14:06
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.

None yet

2 participants