Skip to content

Performance: Avoid heap allocations when converting between int & Guid - #23389

Merged
AndyButland merged 3 commits into
umbraco:mainfrom
Henr1k80:main
Jul 15, 2026
Merged

Performance: Avoid heap allocations when converting between int & Guid#23389
AndyButland merged 3 commits into
umbraco:mainfrom
Henr1k80:main

Conversation

@Henr1k80

Copy link
Copy Markdown
Contributor

Prerequisites

  • I have added steps to test this contribution in the description below

@github-actions

Copy link
Copy Markdown

Hi there @Henr1k80, thank you for this contribution! 👍

While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:

  • It's clear what problem this is solving, there's a connected issue or a description of what the changes do and how to test them
  • The automated tests all pass (see "Checks" tab on this PR)
  • The level of security for this contribution is the same or improved
  • The level of performance for this contribution is the same or improved
  • Avoids creating breaking changes; note that behavioral changes might also be perceived as breaking
  • If this is a new feature, Umbraco HQ provided guidance on the implementation beforehand
  • 💡 The contribution looks original and the contributor is presumably allowed to share it

Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution.

If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

@AndyButland AndyButland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @Henr1k80 - all looks good. I'll merge this in and also cherry pick to v17/dev so we have it for the current LTS too.

@AndyButland AndyButland changed the title Avoid heap allocations when converting between int & Guid Performance: Avoid heap allocations when converting between int & Guid Jul 15, 2026
@AndyButland
AndyButland enabled auto-merge (squash) July 15, 2026 17:34
@AndyButland
AndyButland merged commit b78feb3 into umbraco:main Jul 15, 2026
29 checks passed
AndyButland added a commit that referenced this pull request Jul 15, 2026
#23389)

* Avoid heap allocations when converting between int & Guid

* Create better spread of test cases.

* Comment the performance optimisations.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
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