Skip to content

Added HXCPP configuration options#883

Open
HEIHUAa wants to merge 4 commits intoCodenameCrew:mainfrom
HEIHUAa:1
Open

Added HXCPP configuration options#883
HEIHUAa wants to merge 4 commits intoCodenameCrew:mainfrom
HEIHUAa:1

Conversation

@HEIHUAa
Copy link
Contributor

@HEIHUAa HEIHUAa commented Jan 21, 2026

Added HXCPP configuration options for performance optimization.

I'm not sure which ones are enabled by default, so I simply added them all together.

Here's a brief description of the potential optimizations each new addition may bring:

  • HXCPP_GC_GENERATIONAL: Makes garbage collection scan mostly only recent, new memory in most cases.
  • HXCPP_GC_DYNAMIC_SIZE: Automatically adjusts the GC memory strategy based on runtime conditions.
  • HXCPP_CPP17: Uses the C++17 compiler, which may bring more modern and intelligent optimizations. (Some of these settings also depend on it)
  • HXCPP_GC_BIG_BLOCKS: Increases memory capacity to near-unlimited, reduces memory fragmentation, and improves large resource loading capability. This also means the number of arrows is no longer limited (Before enabling this, I experienced crashes when the note count reached around 70k during casual play).
  • HXCPP_FAST_LINK: Improves compilation speed (though I didn't really notice a difference).

You can also download the build from https://github.com/HEIHUAa/CodenameEngine-HEIHUA/actions/runs/21208146062 for testing.

I tested this under modcharts, which have a significant impact on memory usage. With the frame rate capped at a maximum of 200, the test results showed that the 1% low FPS increased from around 75 to 150.

Copy link

@ACoolioDude ACoolioDude left a comment

Choose a reason for hiding this comment

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

This is promising

Copy link
Contributor

@MRK2009 MRK2009 left a comment

Choose a reason for hiding this comment

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

LGTM though

@Raltyro Raltyro added type:breaking change type:enhancement New feature or request type:compiling Issue or needing help with compiling and removed type:breaking change labels Feb 3, 2026
@HEIHUAa
Copy link
Contributor Author

HEIHUAa commented Feb 4, 2026

I'd like to know what the issue is. Why hasn't this pull request been approved? Based on my testing, it only affects GC-related components. Since submitting this PR, I've been using the compiled executable to play and develop mods without any issues. It's also clear that no one would intentionally modify the GC. Could there be problems on other desktop platforms?

@r6915ee
Copy link
Contributor

r6915ee commented Feb 4, 2026

I'd like to know what the issue is. Why hasn't this pull request been approved? Based on my testing, it only affects GC-related components. Since submitting this PR, I've been using the compiled executable to play and develop mods without any issues. It's also clear that no one would intentionally modify the GC. Could there be problems on other desktop platforms?

It's likely that there hasn't been time to merge them. Codename isn't limited to merge cycles, so merge time is completely dependent on whether or not people over at Codename Crew are available to merge the pull request. If there is an issue, they'll usually say what the issue is.

@HEIHUAa
Copy link
Contributor Author

HEIHUAa commented Feb 4, 2026

I'd like to know what the issue is. Why hasn't this pull request been approved? Based on my testing, it only affects GC-related components. Since submitting this PR, I've been using the compiled executable to play and develop mods without any issues. It's also clear that no one would intentionally modify the GC. Could there be problems on other desktop platforms?

It's likely that there hasn't been time to merge them. Codename isn't limited to merge cycles, so merge time is completely dependent on whether or not people over at Codename Crew are available to merge the pull request. If there is an issue, they'll usually say what the issue is.

ok

@Raltyro
Copy link
Member

Raltyro commented Feb 5, 2026

Sorry, but this does need further testing, i don't really want the engine breaking randomly because of garbage collector or hxcpp changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:compiling Issue or needing help with compiling type:enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants