Skip to content

Conversation

@KoloInDaCrib
Copy link
Contributor

@KoloInDaCrib KoloInDaCrib commented Nov 22, 2025

Linked Issues

N/A

Description

Unlike other basic types, arrays and maps aren't automatically copied when you asign them to a variable.

image image

This means that in FunkinMemory, there are cases where permament cache maps get fully cleared, which hurts performance since the sounds/bitmaps would have to get cached again.
I can't say how much this affects performance, as this doesn't affect my computer that heavily, though what I can say is that with this the memory usage won't build up over time the more songs are played in a session, since the cache is cleared after exiting results. From my testing I've had memory usage roll back from 1gb to 0.75gb after exiting a song.

Screenshots/Videos

N/A

@github-actions github-actions bot added pr: haxe PR modifies game code. status: pending triage Awaiting review. size: small A small pull request with 10 or fewer changes. labels Nov 22, 2025
Copy link
Contributor

@NotHyper-474 NotHyper-474 left a comment

Choose a reason for hiding this comment

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

So I'm not the only one who noticed this issue

@AbnormalPoof AbnormalPoof added the type: optimization Involves a performance issue or a bug which causes lag. label Nov 22, 2025
@AbnormalPoof AbnormalPoof self-requested a review November 22, 2025 21:19
@AbnormalPoof AbnormalPoof added status: reviewing internally Under consideration and testing. and removed status: pending triage Awaiting review. labels Nov 22, 2025
Copy link
Member

@AbnormalPoof AbnormalPoof left a comment

Choose a reason for hiding this comment

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

lmao

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

Labels

pr: haxe PR modifies game code. size: small A small pull request with 10 or fewer changes. status: reviewing internally Under consideration and testing. type: optimization Involves a performance issue or a bug which causes lag.

Development

Successfully merging this pull request may close these issues.

3 participants