Skip to content

Use reserve in LocalVector::resize, to restore expected growth behavior #107796

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

Merged
merged 1 commit into from
Jun 22, 2025

Conversation

Ivorforce
Copy link
Member

We introduced 1.5x growth factor for LocalVector in 4.5 with #100944.
3 months later, this regressed for resize with #104522 (sorry!).

This makes the current LocalVector growth inconsistent, with 2x for resize and 1.5x for other operations.

There are no actual problems associated with this change (i think), so It's not super risky to merge for 4.5 still — but it's also not a super important bug to fix. 4.6 would also be an OK target for this PR.

@Ivorforce Ivorforce added this to the 4.5 milestone Jun 21, 2025
@Ivorforce Ivorforce requested a review from a team as a code owner June 21, 2025 09:29
@akien-mga akien-mga merged commit 2e60d51 into godotengine:master Jun 22, 2025
20 checks passed
@Ivorforce Ivorforce deleted the resize-rereserve branch June 22, 2025 10:10
@akien-mga
Copy link
Member

Thanks!

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.

2 participants