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

Make yaml check utility load each map separately to reduce memory usage. #19649

Merged
merged 1 commit into from
Dec 4, 2021

Conversation

darkademic
Copy link
Contributor

I ran into an out of memory exception when building CA, and identified the problem being with the YAML check in the utility tool. It loads every map with a significant overhead before checking them, and CA with its 300+ maps ends up using about 8.5GB of RAM.

Running --check-yaml on the bleed RA mod uses approx 1.2GB of RAM. These changes reduce it to around 400MB.

Copy link
Member

@abcdefg30 abcdefg30 left a comment

Choose a reason for hiding this comment

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

Some small code style changes: We want to avoid braces around single line statements.

OpenRA.Game/Map/MapCache.cs Outdated Show resolved Hide resolved
OpenRA.Game/Map/MapCache.cs Outdated Show resolved Hide resolved
OpenRA.Game/Map/MapCache.cs Outdated Show resolved Hide resolved
OpenRA.Game/Map/MapCache.cs Outdated Show resolved Hide resolved
Mailaender
Mailaender previously approved these changes Sep 17, 2021
Copy link
Member

@Mailaender Mailaender left a comment

Choose a reason for hiding this comment

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

No adverse effect on linting and lint performance.

Copy link
Member

@abcdefg30 abcdefg30 left a comment

Choose a reason for hiding this comment

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

Code changes lgtm otherwise.

OpenRA.Game/Map/MapCache.cs Outdated Show resolved Hide resolved
OpenRA.Game/Map/MapCache.cs Outdated Show resolved Hide resolved
@Mailaender Mailaender merged commit c51327c into OpenRA:bleed Dec 4, 2021
@Mailaender
Copy link
Member

Changelog

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.

None yet

4 participants